Hi there,

I have an old system that I'm porting over to SA. In the old system
there is one entity that keeps a change history of itself. In the code
that performs db updates, the current state of the object is examined
and before it is updated I insert rows to a table with colums like
this:

object id
change-event-id
fieldname
old-value
new-value

This is used to render a change history of the entity to the user.

Now, can I automate this somehow with SA? Preferably I'd like to do
this automatically on object update. Can I use the "dirty" set in the
session to find out what columns of the mapped table have changed?

How do I hook into the update action - I think I need a mapper
extension, but can you point me to some examples?

Has anyone done something similar (the whole changelog thing) with SA?

Arnar

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to