I'm looking for a way to load mapped attributes for a *Transient* object. (I've actually needed exactly this several times... it is a recurring need.) Say I have an object and have no intention at this point of adding it to the database (so it is not Persistent or even Pending), but the local side of the foreign key attributes are populated for a specific attribute or collection. I would like to get the same SQL or Query that sqla would render if this were a Persistent object and a lazy loaded attribute.
For example, say I had an Order object which has a lazily loaded Customer relationship. for a persistent ord object, I say: ord.customer and sqlalchemy issues "SELECT customers.customerid ... FROM customers WHERE customers.customerid = :param_1" {'param_1': '7'} If ord were Transient, but ord.customerid were set to "7", then I would like to get the Query object that returns the above SQL, despite this being a Transient object, so I can manually populate this attribute. Thanks very much in advance. Kent -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.