I insert a raw into a table and then retrieve again but columns which 
are filled by a db trigger don't return the updated values.

The following is a code snippet and I wonder what I am missing.

engine = sa.create_engine(url, encoding='utf8', echo=False)
Session = sao.sessionmaker(autoflush=True, transactional=True)
Session.configure(bind=engine)
session = Session()
botlot = db.Bottaglot()
session.save(botlot)
session.commit()

print 'org'
print botlot.bottaglotid
print botlot.updated

botlot2 = session.query(db.Bottaglot).get(botlot.bottaglotid)
print 'reloaded'
print botlot2.bottaglotid
print botlot2.updated

Both columns "updated" will show None instead of at least for botlot2 it 
should show the current date which was inserted into that column by a db 
trigger.

If then run this:
engine = sa.create_engine(url, encoding='utf8', echo=False)
Session = sao.sessionmaker(autoflush=True, transactional=True)
Session.configure(bind=engine)
session = Session()
botlot3 = session.query(db.Bottaglot).get(39)
print 'reloaded'
print botlot3.bottaglotid
print botlot3.updated

At this point I get the value for the column "updated" I expected.

What am I missing?

Werner

P.S.
This is with SA 0.4 final and Firebird SQL 2.1beta

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to