Le dimanche 14 février 2010 à 19:45 +0100, Wichert Akkerman a écrit :
> 
> That is by design: zope.sqlalchemy (which is really the thing you are 
> complaining about) forces you to commit the entire transaction. This is 
> required to coordinate transactions between multiple participants in a 
> transaction, prevent one of them from getting out of sync.

I understand this is by design, but better again would have been a flag
to disable it.

> > And transaction.commit() has the annoying "side effect" that it will
> > also purge the session afterwards, making all your objects unusable
> > unless you go out of your way to fetch them again manually.
> 
> Iirc it starts a new session, making sure that you do not leak things 
> between transactions.

Well, there are situations where you'd want to "leak" things between
transactions... If SQLAlchemy itself doesn't enforce it, I'm not sure
why the "transaction" package thinks it should.

Regards

Antoine.


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

Reply via email to