On Oct 1, 2012, at 7:21 AM, Vlad K. wrote: > > > To answer my own question, seems like SQLA won't automatically process inner > joins if you supply individual columns to the session.query(), if had to pass > the declarative model class itself for this to work as expected.
If I understand correctly, this isn't accurate. Your query needs the usage of query.join(), and this usage is not related to whether or not you supply a complete entity to select from. query(MyClass.x, MyClass.y, MyOtherClass. q).join(MyClass.otherclass) is the primary form you'd use here. you can also set the first join source explicitly if needed using query.select_from(MyClass).join(<etc>) if you're composing a particular string of joins. I'm not sure what "won't automatically process inner joins" means, does that mean, you get an error message, or you're forced to call .join() as opposed to some other system of joining two entites, or what. I see that for all the extensive docs there are on join, none of them go out of their way to make it clear that it can be any series of columns or entities selected from.... -- 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.