[sqlalchemy] Re: query on self-referencing polymorphic mapper

2007-03-05 Thread svilen
ok, that solves some things, i won't need those ultra-explicit selects() now. The other problem remains: union's mechanism for corresponding_column() takes ownership of all columns mentioned in the WHERE, regardless if they are from a table within the union/join, or in alias of that table.

[sqlalchemy] Re: query on self-referencing polymorphic mapper

2007-03-05 Thread Michael Bayer
On Mar 5, 2007, at 11:58 AM, svilen wrote: The other problem remains: union's mechanism for corresponding_column() takes ownership of all columns mentioned in the WHERE, regardless if they are from a table within the union/join, or in alias of that table. i.e. all columns mentioned in the

[sqlalchemy] Re: query on self-referencing polymorphic mapper

2007-03-02 Thread svilen
hi. i have the case of polymorphic mapper referencing itself (or other of it's sub-class objects), and i want to query/filter on a value of the referenced object. e.g. all people who have friends of age 25. these are highly highly complex queries and im not sure if the Query SQL

[sqlalchemy] Re: query on self-referencing polymorphic mapper

2007-03-02 Thread Michael Bayer
not like ive been digging into your specific issues recently, but i added a flag that made the new abc tests a lot easier, for this PG issue in particular. the polymorphic unions look like this now: abcjoin = polymorphic_union( {a:ta.select(tb.c.id==None,

[sqlalchemy] Re: query on self-referencing polymorphic mapper

2007-03-01 Thread Michael Bayer
On Mar 1, 2007, at 12:44 PM, svilen wrote: hi. i have the case of polymorphic mapper referencing itself (or other of it's sub-class objects), and i want to query/filter on a value of the referenced object. e.g. all people who have friends of age 25. these are highly highly complex