3 ms·
The version is part of the WHERE clause in the UPDATE statement. Therefore, it is only possible to update the version of the entity that you were updating. If t
by smerchek 11y ago
The version is part of the WHERE clause in the UPDATE statement. Therefore, it is only possible to update the version of the entity that you were updating. If the entity is updated before your statement, it would not succeed in updating the row.
Is there a different concurrency issue I'm not seeing caused by updating the version in the trigger?
- mapleoin 11y agoYes, you're right. I didn't notice the WHERE in the UPDATE statement. That makes a lot more sense now, thanks! You still have the issue of someone setting the version explicitly in an update statement without a WHERE clause which checks for the current version. But I guess as long as you enforce not doing that it's fine.