On 27.12.2008 11:06 Uhr, Jim Jones wrote: > Hi List, > > I have this simple model (in declarative style): > > class Item( Base ): > __tablename__ = 'items' > desc = Column( 'desc', UnicodeText(), nullable=False ) > email = Column( 'email', UnicodeText(), nullable=False ) > > How can I trigger an event when the value of 'desc' has changed > and the instance is persisted (e.g. via 'session.save(item)')?
Please check the SA docs on using the decl. layer. It tells you how to define your own get/set methods using the property mechanism. If this is not good enough: check the MapperExtension mechanism, or SessionExtensions or AttributeExtensions. -aj --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. & Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[email protected] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard
