heres an entirely valid SA expression:

         subq = t2.select().alias('subq')
         s = select([t1.c.col1, subq.c.col1], from_obj=[t1, subq,  
t1.join(subq, t1.c.col1==subq.c.col2)])

the way the above works is, t1.join(subq) sends a message to the  
enclosing Select to "hide" t1 and subq individually in the FROM  
clause.  this is some pretty old logic but its still whats in effect  
today and it makes it easy to build up Select statements without  
worrying whats already in the FROM clause.

traversing that, we will hit "subq" at least twice.   r3755 makes more  
changes to accomodate the above, where it only clones "subq" once.   
the resulting clone still has some old "subq" references lying around  
though...instead of trying to make the traversal crazy so that it  
finds and exactly replaces every occurence of "subq" or "subq"- 
referencing column with the exact correct replacement, i changed  
Select so that when it constructs the FROM clause it takes into  
account the old instance of "subq" as well as the cloned  
version...since thats really the only place that "multiple copies" of  
subq really matter in the final output.



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