* Michael Bayer <mike...@zzzcomputing.com> [2014-02-12 09:19]:
> On Feb 12, 2014, at 1:49 AM, Wolfgang Schnerring <w...@gocept.com> wrote:
> > I know that flush does not trigger expiry. ;) I was wondering whether
> > savepoints qualified as being a stronger boundary than flush and thus might
> > be worthy of triggering expiry. But I guess that answers my question then:
> > the current behaviour *is* intentional, and if I want expire_all then I'll
> > just have to call it myself (which is fine, I guess).
> 
> well I’d look into using events if you’d like every begin_nested() to issue
> an expiry.  The after_transaction_create should be a good event to use:
> http://docs.sqlalchemy.org/en/rel_0_9/orm/events.html#sqlalchemy.orm.events.SessionEvents.after_transaction_create
> - check if the given SessionTransaction is “nested” by seeing if it has a
> non-None ._parent attribute.

Excellent! Thank you for the pointer! I must confess I'm not very familiar with
the event system (yet), I somehow got stuck about 0.6ish where events were not
as nicely accessible as they are now -- so I'm actually looking forward to using
those. :)

Wolfgang


-- 
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/groups/opt_out.

Reply via email to