Better HN
topnewbestaskshowjobs
Log inSign up

smerchek

55 karma · joined Aug 5, 2015 (11y ago) · 7 submissions

Submissions

comment 11y ago · link · parent

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?

comment 11y ago · link · parent

Totally noticed this in google analytics, earlier. Whoops. It's now fixed!

comment 11y ago · link · parent

Concurrency issues can be solved by restricting the UPDATE to the version passed in by the application.

If I think I'm updating version 2 of an entity, then only update that version, otherwise throw an error.

I've updated the post to address this scenario.

comment 11y ago · link · parent

Valid question though, I've updated the post to be more explicit and added a couple more query examples.

5.

Taking the 'D' Out of CRUD with Soft Updates(scottsmerchek.com ↗)

68 points · by smerchek · 11y ago · 58 comments

comment 11y ago · link · parent

Right. I think updates are just as destructive, and oftentimes completely change the meaning on an entity. That's why I also wrote about using soft updates: http://scottsmerchek.com/2015/08/04/taking-the-d-out-of-crud...

7.

Taking the 'D' Out of CRUD with Soft Deletes(scottsmerchek.com ↗)

1 points · by smerchek · 11y ago · 2 comments