On May 4, 2007, at 9:23 AM, ml wrote:

>
> Michael Bayer napsal(a):
>>
>> On May 1, 2007, at 4:42 AM, ml wrote:
>>
>>> I want to get recipes which belongs to a particular category and
>>> having
>>> a particular flag. So I need both joins recipe-category and recipe-
>>> flag.
>>>
>>
>> ah.  in that case you dont want query.join(x).join(y), you want the
>> second join to still be relative to the original query.  i think
>> youre going to have to spell that one out explicitly for now.
>>
>>
>
> I don't understand what you mean by "spell that one out explicitly". I
> need something like
> (recipes JOIN categories) INTERSECTION (recipes JOIN flags)
> or
> ((recipes JOIN categories) JOIN flags)
> generated by the ORM.

ORM isnt going to generate your joins for you, its too complex.

session.query(SomeClass).select_from(intersection(recipes.join 
(categories), recipies.join(flags)).select(<criterion>)


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to