Lance Edgar wrote:
- do objects end up in session.dirty as a result of attributes being set or changed?

Setting an attribute is enough for the instance to wind up in Session.dirty, according to http://www.sqlalchemy.org/docs/reference/orm/sessions.html#sqlalchemy.orm.session.Session.dirty

Indeed.

I'm assuming if you need to know which attributes have changed then you'll have to examine the instance's state a little closer yourself, looking at the instrumented history for each attribute, etc. I've not done this though so I'm afraid that's a guess.

This turns out to be my friend:

http://www.sqlalchemy.org/docs/reference/orm/mapping.html?highlight=instancestate#sqlalchemy.orm.attributes.get_history

...hence the later question about History obejcts ;-)

Chris

--
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