Hello! I sometimes find it more convenient to create to construct a query 
without a session, and then to add the session at the end using 
`with_session`. In particular, when constructing non-trivial queries, not 
having to pass the session around means one less argument to manage. 
However, this doesn't seem to work when using subquery loading, resulting 
in the error `AssertionError: Subquery session doesn't refer to that of our 
context. Are there broken context caching schemes being used?`.

Is there a sensible way to get the subqueries to use the same session, or 
is the answer just to always construct queries with the session?

Thanks

Michael

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to