Michael Bayer ha scritto:
> if the transaction fails, the session goes right back to the same state
> that existed before you called the flush(), as though nothing happened.

With this example:

trans = begin_transaction()
session = ctx.current
a = SomeObject(...)
session.save(a)

raise Exception()
session.flush()
trans.commit()

The session will have the a object attached to it, so if another 
function calls session.flush (in the same thread), the object is created 
on the database.

This is not what I want.
Maybe the better solution is to not share sessions at all.



Regards  Manlio Perillo

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to