Hello! I'd like to attach a sort of 'event' to an object mapped using
sqlalchemy; this way I could create a sort of db-independent trigger that
would be activated whenever the object is changed (and thus an UPDATE or
DELETE is performed). A big candidate for this would be a 'last_modified'
column where I'd like to store a timestamp. I'm currently employing a
'workaround' solution, consisting of a write() metod in the mapped object,
which roughly does:

def write(self):
        self.last_modified = mx.DateTime.now()
        objectstore.commit(self)

But I don't like it, because I'd like to commit many objects at once.

-- 
Alan Franzoni <[EMAIL PROTECTED]>
-
Togli .xyz dalla mia email per contattarmi.
Rremove .xyz from my address in order to contact me.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to