Hi,
I have a definition similar to this::
class Ticket(Base):
__tablename__ = 'ticket'
id = Column(Integer, primary_key=True)
assigned_to_id = Column(ForeignKey(User.id))
assigned_to = relation(User, primaryjoin = assigned_to_id == User.id,
lazy=True)
If I instantiate
ticket = Ticket()
ticket.assigned_to_id = user.id
I can commit and after that I can 'print ticket.assigned_to'
Is there a way to have ticket_assigned_to available *before* committing?
I'd like to have it available in after-flush phase of sessionExtension.
SQLA knows how to retrieve it so I wandererd if it can be instructed to
make it available on demand.
thanks
sandro
--
Sandro Dentella *:-)
http://sqlkit.argolinux.org SQLkit home page - PyGTK/python/sqlalchemy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---