On Sep 3, 2010, at 9:36 AM, Kent wrote: > For the case of customerid = '7', that is a simple problem, but when > it is a more complex join condition, we only wanted to define this > condition in one single place in our application (namely, the orm). > That way, if or when that changes, developers don't need to search for > other places in the app that needed to manually duplicate the logic of > the orm join condition. > > If I supplied the DBSession to sqla, it would know how to create the > proper Query object for this lazy load. Can you point me in the right > direction (even if where you point me is not currently part of the > public API)?
Query has the with_parent() method for this use case. > > Thanks again, > Kent > > -- > 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. > -- 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.
