> stmt = doc_type_table.select()
>
> join_table = get_join_table('widgets')
> stmt = stmt.join(join_table,
> SA.and_(doc_type_table.c.ref_id==join_table.primary_key[0],
>         doc_type_table.c.doc_type=='widgets'))
>
> join_table2 = get_join_table('spam')
> stmt = stmt.join(join_table2,
> SA.and_(doc_type_table.c.ref_id==join_table2.primary_key[0],
>         doc_type_table.c.doc_type=='spam'))
>
> stmt.execute()

isn't this supposed to be:
s = join( join( doc_type_table, join_table, onclause1), anothertbl, 
abnotherclause)...
print [q for q in s.select()]

or something alike?

maybe Another way is to use ext.SelectResults over the table.select() 
and add more joins/whatever to that one...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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