Re: [sqlalchemy] How to better understand `remote_side` in sqlalchemy?

2017-07-20 Thread Jinghui Niu
Now I see, thanks Mike! On Jul 20, 2017 6:51 PM, "Mike Bayer" wrote: > On Thu, Jul 20, 2017 at 8:10 PM, Jinghui Niu wrote: > > I see. But still I'm struggling to see the real difference between: > > > > Node.parent_id = Node.id > > vs. > >

Re: [sqlalchemy] How to better understand `remote_side` in sqlalchemy?

2017-07-20 Thread Mike Bayer
On Thu, Jul 20, 2017 at 8:10 PM, Jinghui Niu wrote: > I see. But still I'm struggling to see the real difference between: > > Node.parent_id = Node.id > vs. > Node.id = Node.parent_id > > Aren't we just switching around sides here? those two conditions are equivalent. but

Re: [sqlalchemy] How to better understand `remote_side` in sqlalchemy?

2017-07-20 Thread Jinghui Niu
I see. But still I'm struggling to see the real difference between: Node.parent_id = Node.id vs. Node.id = Node.parent_id Aren't we just switching around sides here? On Thu, Jul 20, 2017 at 4:47 PM, Mike Bayer wrote: > On Thu, Jul 20, 2017 at 1:34 PM, Jinghui Niu

Re: [sqlalchemy] How to better understand `remote_side` in sqlalchemy?

2017-07-20 Thread Mike Bayer
On Thu, Jul 20, 2017 at 1:34 PM, Jinghui Niu wrote: > I've been studying sqlalchemy's self referential table. I've read the > documentation many times and still have difficulties understanding the > concept of remote_side. Could someone please draw a diagram or use an >