Hi,
I have declarative Model with couple of columns, one of them is
lastAccess = Column('LastAccess', DateTime, nullable=False,
onupdate=datetime.datetime.utcnow)
I fetch the object from database like the following:
obj = ScopedSession.query(Model).get(something)
Later in code I commit the session as:
ScopedSession.commit()
I would like to have *lastAccess* updated in database when issuing
*commit()*. However the column remains unchanged.
I do understand that *onupdate* callback is called on update, but how to
trigger the update since I don't want to change any other column?
In other words, how can I mark the *obj* as "dirty" so *onupdate* will take
effect?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.