On Mon, 2011-11-14 at 21:14 +0100, Vlad K. wrote: > Because each savepoint must be met by one commit or one rollback. If I > use session.flush(), the second call would start savepoint 2, but would > not release savepoint 1 (nor roll it back). While that may work "fine" > for this case, I am not sure I want that in the real app where situation > is much more complex. > > > http://www.sqlalchemy.org/docs/orm/session.html#using-savepoint > > > Also, this answers my other problem I posted a few days ago about using > database-based process "locks" with select ... for update. I need > multiple commits within single request.
I'll defer to you on this, but I'll note that the "savepoint" object you get back from calling transaction.savepoint() has a "rollback" method FWIW. - C > > > .oO V Oo. > > > On 11/14/2011 08:44 PM, Chris McDonough wrote: > > Out of curiosity, why are you committing in the middle of view logic? > > It's none of my business really, but session.flush() would seem to get > > you what you want and would work fully within the one-request-one-commit > > policy. > > > > - C > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.