Re: [sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-09 Thread Pau Tallada
Ok, thank you! :) 2012/2/8 Michael Bayer > OK, a misunderstanding, the proof of concept is working as of a specific > version (rf41aa3ad1da9) - if you've just checked out the branch then you're > seeing a refactoring of code which is in flux, and that stack trace is > specifically failing on new

Re: [sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-08 Thread Michael Bayer
OK, a misunderstanding, the proof of concept is working as of a specific version (rf41aa3ad1da9) - if you've just checked out the branch then you're seeing a refactoring of code which is in flux, and that stack trace is specifically failing on new code that isn't actually doing anything other th

Re: [sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-08 Thread Pau Tallada
Uhm, the test I attached on previous mail fails using this branch: $ python test_relationships.py Traceback (most recent call last): File "test_relationships (1).py", line 53, in c1 = Company() File "", line 2, in __init__ File "/home/tallada/Projectes/PIC/multivac/trunk/lib/sqlalchemy_

Re: [sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-08 Thread Pau Tallada
Thank you very much! I'll test it ASAP :) 2012/2/8 Michael Bayer > I have good news on this front, in that I've nailed down how this will > work, including a patch that gets this basic thing working as a proof of > concept. However, the issue of being able to distinguish "remote" and > "forei

Re: [sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-07 Thread Michael Bayer
I have good news on this front, in that I've nailed down how this will work, including a patch that gets this basic thing working as a proof of concept. However, the issue of being able to distinguish "remote" and "foreign" in a binary expression where a column points to itself can benefit fro

Re: [sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-01 Thread Michael Bayer
This is essentially ticket #1401 and I've attached this there as well as moved up the priority, however this issue is extremely complicated and would require some serious rethinking of the relationship()'s inner workings.It would take several days to come up with a general solution so I can'

[sqlalchemy] Possible bug with join condition on self-referential outer joins

2012-02-01 Thread Pau Tallada
Hi! I have a table with a self-reference of two columns that represents a tree structure. I was trying to build an outerjoin to select all the nodes have children but NO grandchildren, but the SQL constructed was incorrect, as it was not aliasing properly one of the columns. note_t Table('node_t'