hi Daniele - You're in luck because I saw you ask this on IRC yesterday. Using a non-mapped selectable as the "thing to select from" in Query wasn't supported, but I considered this a bug which has been fixed:
http://www.sqlalchemy.org/trac/ticket/2298 If you get the latest tip at http://hg.sqlalchemy.org/sqlalchemy/archive/default.tar.gz, it should work now. On Oct 13, 2011, at 10:42 AM, Daniele wrote: > What is the proper way to use a subquery as the FROM clause, while > being able to use the Query.join() method? > > Here is an example of what I mean: http://pastebin.com/RUktuZZm > > The docs at > http://www.sqlalchemy.org/docs/orm/query.html#sqlalchemy.orm.query.Query.subquery > state: "Eager JOIN generation within the query is disabled.". > If I understand it correctly, is there a specific reason for this not > being enabled by default, or possible at all? > > Many thanks. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@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. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@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.