Chaouche, Thank you for information.

At the instance level, how will I know whether the instance going to
be deleted or updated or insert. How do I get the property?

And during update, how to identify which field has been modified?

Regards,

Krish

On Nov 3, 6:30 pm, chaouche yacine <yacinechaou...@yahoo.com> wrote:
> http://www.sqlalchemy.org/docs/orm/examples.html?highlight=versioning...
>
> You can find other interesting recipes in :
>
> http://www.sqlalchemy.org/trac/wiki/UsageRecipes
>
> Cheers,
>
> Y.Chaouche
>
> ----- Original Message ----
> From: Gopalakrishnan Subramani <gopalakrishnan.subram...@gmail.com>
> To: sqlalchemy <sqlalchemy@googlegroups.com>
> Sent: Wed, November 3, 2010 5:21:32 AM
> Subject: [sqlalchemy] AuditLog/History logging
>
> We have around 10 different tables in the database and we use
> sqlalchemy's declarative base style table definition. We are happy
> about it.
>
> Now we need to have auditlog/history of changes made to database
> records.
>
> For example, the entry could be new recorded added or existing record
> updated or deleted. These information should be reflected in the
> database table called "history".
>
> So we end up writing very simular code for every tables in our
> database for each crud operation.
>
> I am thinking whether we can have simplified solution like
>
> 1. We define our own custom class derived from declarative_base
> instance
> 2. We derive the rest of our classes from our own custom class
> mentioned in the step 1
> 3. Whenever there is changes in the record, Sqlalchemy to give
> callback on post/pre operation and we capture those changes in the
> derived class and use the history class to write the changes to the
> database.
>
> So we can derive all our future classes from this model and I will be
> free to handle the rest of the information.
>
> Can you please help me to implement this?
>
> Regards,
>
> Krisj
>
> --
> 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 
> athttp://groups.google.com/group/sqlalchemy?hl=en.

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