On Jul 25, 2014, at 4:43 AM, George Sakkis <george.sak...@gmail.com> wrote:
> > > On Thursday, 24 July 2014 21:56:11 UTC+3, Michael Bayer wrote: > > expunge() is a bug: > > https://bitbucket.org/zzzeek/sqlalchemy/issue/3139/expunge-after-delete-fails > > it's supposed to raise (hence can't fix this til 1.0). > > so ignore expunge. if you were to emit session.rollback(), you'd find the > DELETE is rolled back and you'd again get True, True. The Session still > knows about this object within the transaction's "ready to roll back" state. > The object isn't permanently not part of the Session until the commit(): > > > session.commit() > log("commit") > > > output: > > commit: (False, False) > > > Thanks, good to know that expunge() is a bug. As for my other questions: > - is session.commit() the only way to dissociate the object from the session? > - I guess a (False, True) combination is not ever possible, correct? you use expunge(), just not after a delete :) (after a delete, you should be forgetting about that object totally). And no the False/True combination is not possible. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.