Hi,
I have a column definition that looks like:
Column('is_cached', Boolean, onupdate=False, default=False,
nullable=False)
The onupdate feature works as advertised.
My issue is that I have a caching script that calls update() which
sets is_cached=True:
conn.execute(mytable.update().where(mytable.c.id==1).values
(is_cached=True))
However, onupdate, works too well in this case and sets
is_cached=False, negating the update which I intended.
I know it's possible to get around this by doing
conn.execute("UPDATE mytable SET is_cached=0 WHERE id=1")
since onupdate is not triggered by a straight SQL command.
However, using the straight SQL feels like a hack (and I have to think
about SQL injection vulnerabilities).
Is it possible to override onupdate values without resorting to
straight SQL?
Thanks,
Sam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---