[sqlalchemy] Re: a-directional i.e. bi-directional m:m relations

2008-12-05 Thread Eric Ongerth
Thanks for the ideas. I thought of all of the above. The one I've been using is the accessor which unions together the necessary things. My question came up when I wondered if there was some even more fundamental way to handle these forwards-backwards cases. I'm glad to know I'm already doing

[sqlalchemy] Re: a-directional i.e. bi-directional m:m relations

2008-12-05 Thread az
there is... u do not want to know if A points B or B points A, u want to know if A and B are related in whatever aspect. That is, A and B are members of some set X denoting that aspect. i.e. moving the belonginess out of A and B alltogether. but this isn't going to make your DB simpler...

[sqlalchemy] Re: a-directional i.e. bi-directional m:m relations

2008-12-05 Thread Eric Ongerth
Oh, right. I don't know what type of brain fog obscured that basic relational fact, except that I may have been burning my synapses a bit too hot lately resulting in a deplorable deficit of neurotransmitters. Thank you for helping me regain the sight of the obvious. On Dec 5, 1:16 am, [EMAIL

[sqlalchemy] Re: a-directional i.e. bi-directional m:m relations

2008-12-02 Thread Michael Bayer
On Dec 2, 2008, at 5:54 PM, Eric Ongerth wrote: Now when I want to find out whether a Foo has a relation to another Foo, I have to check whether there exists any row in foo_relations that has the given Foo as either as this OR that. Also, what if I need backrefs on the foo_relations