Re: [sqlalchemy] Trouble when explicit specify join sequence with alias table

2012-03-07 Thread Michael Bayer
On Mar 6, 2012, at 10:19 PM, Liang dong wrote: Dear Michael, Appreciate for help me solving this problem. Meanwhile I found something interesting, maybe worth to tell you. Two alias object of same table with same name are treated as conflicts when both using in query. Error 1066, Not

[sqlalchemy] Trouble when explicit specify join sequence with alias table

2012-03-06 Thread Liangd
Hi, I have trouble on making a query between two tables: ProcessedDataset - ID ProcDSParent - ThisDataset - ItsParent To find the `Parent` and `Child` of a `Dataset`, I need explicit specify the join sequence between: `ProcessedDataset` -- `ProcDSParent` -- `ProcessedDataset`

Re: [sqlalchemy] Trouble when explicit specify join sequence with alias table

2012-03-06 Thread Michael Bayer
On Mar 6, 2012, at 1:22 AM, Liangd wrote: --- Approach 1: * FromClause.join + expression.select - r_join = dataset r_join.join(child_parent, \ dataset.c.ID == child_parent.c.ThisDataset)

Re: [sqlalchemy] Trouble when explicit specify join sequence with alias table

2012-03-06 Thread Liang dong
Dear Michael, Appreciate for help me solving this problem. Meanwhile I found something interesting, maybe worth to tell you. Two alias object of same table with same name are treated as conflicts when both using in query. Error 1066, Not unique table/alias is throwing. Many regards, Dong