darkblueB wrote: > > select k.name, c.description from keyword k > JOIN cookbook_keyword on (k.id = keyword_id) > JOIN cookbook c on(c.id = cookbook_id)
Session.query(Cookbook.description, Keyword.name). join(Cookbook.keywords) > > is one example, I believe > > > On Aug 31, 7:51 am, "Michael Bayer" <mike...@zzzcomputing.com> wrote: >> darkblueB wrote: >> >> > well, these all do *something* but I am a little lost on how to frame >> > these >> >> > Session.query(Cookbook).select_from( join >> > (Cookbook,Keyword,Cookbook.keywords)).all() >> > ## selects id and description from cookbook, but empty set comes back? >> >> > Session.query(Cookbook.keywords).select_from( join >> > (Cookbook,Keyword,Cookbook.keywords)).all() >> > ## ibid >> >> > Session.query(Cookbook,Keyword).select_from( join >> > (Cookbook,Keyword,Cookbook.keywords)).all() >> > ## selects cookbook id, description, and keyword id, name >> >> can you illustrate the SQL for the query you'd like to produce ? >> 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 -~----------~----~----~----~------~----~------~--~---