I'd like to get notified (either by checking the session or through an 
event handler) when an attribute changes value. None of the options I've 
figured out so far work for this. Thanks for the help!

*Event Handler*
event.listen(Object.attribute, 'set', event_handler)
this method fires before the Object gets all the attributes from the 
database so the Object isn't really usable.


*Session.Dirty*
session.dirty: I can check the updated object before I commit it but I 
can't figure out a way to get the oldvalue here. history doesn't seem to 
provide an access point.
for o in session.dirty:
    if o.is_modified():
        inspect(o).attrs.attribute.history


SQLAlchemy==0.8.0b2
postgres (PostgreSQL) 9.2.3

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to