Hi,
in my project, I use onupdate attribute :
foobar_table = Table(FooBar, meta.metadata,
...
Column(created, DateTime(), default=datetime.datetime.now),
Column(modified, DateTime(), default=datetime.datetime.now,
onupdate=datetime.datetime.now),
...
)
All work great.
However, my
Not sure on this one, but are you passing a formatted date string? Maybe you
should set a datetime object directly and let SA do the string conversion
during flush.
Alex
Sent from my fantastic HTC Hero
On Oct 28, 2010 1:41 AM, KLEIN Stéphane klein.steph...@gmail.com wrote:
Hi,
in my project,
I actually have this same issue as well..
I have a field that means the record has been tested. Any updates to the
field make tested = False, all except for one other field. However when I
updated that field and this field it still gets reset to false..
record.approved=True
record.tested=True
The only way around this is to do two separate commits
record.approved = True
db.session.commit()
record.tested = True
db.session.commit()
record.approved is True
record.tested is True
--
Thadeus
On Thu, Oct 28, 2010 at 2:22 PM, Thadeus Burgess thade...@thadeusb.comwrote:
I actually have
again, no reason why that should be the case from an ORM perspective, please
provide a succinct and full working test case and I can evaluate what you're
doing.
On Oct 28, 2010, at 3:24 PM, Thadeus Burgess wrote:
The only way around this is to do two separate commits
record.approved = True