Am 09.01.2013 17:20, schrieb Michael Bayer:
> the after_commit() event is independent of any flush, so the last event
> where the history API still reports the changed attributes on individual
> instances is after_flush(). If you need the aggregate of all attributes
> that were changed over many flushes within the span of a transaction, you'd
> probably want to use after_flush() and aggregate them all together
> somewhere.

Is there a reasonably safe place in the session where I could store these?
My line of thought is that all this info is specific to a transaction so I'd
prefer storing it somewhere directly attached to that transaction.

In my ideal world I would not have to do any state tracking (rollbacks, ...)
because I just aggregate and only act on final success. Python's reference
counting could deal with aborted transactions etc.

> checking attribute history in 0.7 is via attributes.get_history():
> http://docs.sqlalchemy.org/en/rel_0_7/orm/session.html?highlight=get_history#sqlalchemy.orm.attributes.get_history

Tried that earlier but didn't see the info I needed. Probably because I was
using the wrong event. I'll try again later.

fs

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to