with_parent seems to add a join condition. Is there a way to get at the query object that would be rendered from a lazy load (or what "subqueryload" would render on the subsequent load), but on a transient object, if i supply the session?
even though not "recommended", can it make sqla believe my transient object is detached by setting its state key? There are reasons i do not want to add this to the session and disabling autoflush would also cause problems. On Sep 3, 9:58 am, Michael Bayer <mike...@zzzcomputing.com> wrote: > 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 lazyload. 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 sqlalch...@googlegroups.com. > > To unsubscribe from this group, send email to > > sqlalchemy+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://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 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.