Suppose I have a PostgreSQL backend and I have the following class:
class Foo(Base):
id = Column(Integer, primary_key=True)
updated_at = Column(DateTime)
and I do
foo = Foo(updated_at=func.now())
session.add(foo)
session.flush()
foo.id # this is already loaded, no additional query emitted
foo.updated_at # this is not loaded, will cause an additional query to
be emitted
Is it possible to have the SQLAlchemy ORM fetch the actual value of
updated_at as part of the INSERT...RETURNING statement like it does for id,
instead of leaving it unloaded and having to issue a second query when I
access it?
Jack
--
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.