Michael Bayer wrote: > sqlite doesn't like the parenthesis. when making the joins with a > SQLA join() construct, you need to make the joins from left to right, > i.e.: > > soup.join(album, ...).join(vinyl, ...) > > > as opposed to: > > soup.join(album.join(vinyl, ...), ...)
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? > just a little taste of my world ! :) :-) \malthe --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---