I just committed a change for this into SVN (changeset 936), patch version is attached.

Thanks. I'll try and use this.

this also raises the idea that maybe a flag on schema.DefaultGenerator which allows it to execute unconditionally on every insert and update might be handy, then youd just have to attach a function to your Table object and that would be it.

This would be great. Is there a way to have the default function called on an instance method of each object to be updated ?

Thanks

Huy




On Feb 11, 2006, at 2:25 AM, HD Mail wrote:

> Hi,
>
> Is there a similar hook or method to execute some code before and > object is updated similar to before_insert ?
>
> I am trying to find a nice way to timestamp my record on update. I > have a "update_date" field which I want to default to datetime.now > () before an update.
>
> Thanks
>
> Huy
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through > log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD > SPLUNK! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Sqlalchemy-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to