I am struggling to understand how to use session events. I want to track inserts&updates in some model and depending on certain criteria modify objects from other model. Judging from docs, I cannot use before_update and similar Mapper Events: http://docs.sqlalchemy.org/en/latest/orm/events.html?highlight=before_flush#sqlalchemy.orm.events.MapperEvents.before_update And from another place in that doc: "The user is encouraged to evaluate the SessionEvents.before_flush() <http://docs.sqlalchemy.org/en/latest/orm/events.html?highlight=before_flush#sqlalchemy.orm.events.SessionEvents.before_flush> and SessionEvents.after_flush() <http://docs.sqlalchemy.org/en/latest/orm/events.html?highlight=before_flush#sqlalchemy.orm.events.SessionEvents.after_flush> methods as more flexible and user-friendly hooks in which to apply additional database state during a flush"
However, docs for session events are very scarce. Are there any examples for using before_flush/after_flush events? For example in case of flush with single update operation, how can I access the object that was updated? Many thanks, Eugene -- 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.