>
>
> I'd like to be able to create a timestamp column called "mtime" in some of
> my columns.  This would hold a timestamp of when the row was last modified.
>
> But I'd like the timestamp to be updated automatically whenever sqlobject
> updates anything else in the row.
>
> How can I do this?  I'd like a solution that is easy to add to any
> table....maybe so easy that the table only has to have a column called mtime
> and then everything happens without anything extra on my part.
>
> Thanks
>

from datetime import datetime
tStamp = DateTimeCol(default=datetime.now)

HTH

Petr Jakes
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to