> ERROR: no such savepoint db=# begin; BEGIN db=# savepoint my_sp; SAVEPOINT db=# insert into foo values (1); ERROR: duplicate key value violates unique constraint "foo_pkey" db=# rollback to my_sp; ROLLBACK db=# commit; COMMIT
> The more I think about it, the more I am convinced that per-request > transactions are a bad idea. In case of CLSQL stores, if something goes > wrong they will leave your database in a consistent state, but your > model will most likely not agree with the database anymore, because we > don't have STM like Clojure does. That's right. I don't use per-request txns either. > To put it another way, your perform updates to your model, and call > persist-object to store your updates. If the database rejects your > changes (due to violated constraints for example, or a race condition > when using SERIALIZABLE isolation level), you normally have no way of > restoring your model to the state from the beginning of the > transaction. And this means is that the current way of doing things in > Weblocks is broken. Suggestions later accompanied by patches are welcome... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "weblocks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/weblocks?hl=en -~----------~----~----~----~------~----~------~--~---
