On Jun 13, 2008, at 12:45 PM, Malthe Borch wrote:
> > Actually, we are sort of doing this already --except-- due to your > previous advice, we're now using the ``inherits``-option to > automatically have SQLA figure out the correct unit-of-work order. > > With this option, the above join results in this query: > > SELECT album.id AS album_id > FROM soup JOIN (album JOIN vinyl ON vinyl.id = album.id) ON vinyl.id = > soup.id > > --instead of-- > > SELECT album.id AS album_id > FROM soup JOIN album on soup.id = album.id JOIN vinyl ON vinyl.id = > soup.id > > That is, SQLA seems to make a left join (or whatever it is) by itself. > How can tell it do this differently? > >> oh. how are you getting it to join from soup-> (album join vinyl) ? "soup" has a relation to "album join vinyl" and you're using query.join() ? it should be creating an aliased subquery for the right side of the join in that case. I thought 0.4 was able to do this; 0.5 definitely can. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---