On Oct 6, 4:22 pm, [EMAIL PROTECTED] wrote:
> hi
> i have a query where
> q = ...q.initial
> q = q.join( some_link_name )
> ...q.otherstuff
> q = q.add_entity( target_klas_of_the_above_link)
> ...
> this used to work ok, but recently it went doing cartesian products
> because the join made itself an alias.

recently as of when ?   q.join() will make a subquery of an alias if
you're joining to a joined-table class.  This because the syntax A
join (X join Y) works very poorly, so it detects that and instead says
A join (SELECT * from X join Y).  I.e. treating the "selectable" of X
join Y like the single unit it is.   But 0.5 has been doing that since
day one and 0.4 does it too, though 0.4 might not do it in the same
set of cases.


> i made it into:
> q = ...q.initial
> q = q.add_entity( target_klas_of_the_above_link)
> q = q.join( some_link_name )
> ...q.otherstuff
>

that works ?   does the join no longer create the subquery ?

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