I'm using Sqlalchemy for the first time and am slowly figuring out most of what I need. However there is one aspect I would like some advice about.
I have a GUI program that gets some number of items (say data about movies for example) from a database and lets the user edit them including foreign key linked table data like directors or actors. My question is how to track changes. A user may change some attribute of a movie (or of one of the subtables linked to it), say the year made, then page to a different movie, and change something there. Such changes are reflected in the session.dirty, session.new and session.deleted properties for a while (up to some point where Sqlalchemy decides it needs to do a flush). But after a flush, the .dirty (et.al.) properties no longer show anything but the changes are still not permanent since no commit has been done yet. I need to indicate in the GUI *what* mapped objects and what attributes of those objects have been changed, perhaps by displaying values in red (for example) to allow the user to review or revert changes before saving (i.e. committing). How can I determine what has been changed, even after a flush? (Or should I disable autoflushing?) How to revert some changes (but not all; for that I would just do a rollback, yes?) -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.