[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-12-14 Thread Michael Bayer
On Dec 14, 2007, at 4:02 PM, dykang wrote: > > Sorry, I didn't clarify, I was speaking about with 0.3, not with 0.4. 0.3 has a very limited add_entity() method, with no ability to set it against an arbitrary alias, so its impossible in 0.3 for an ORM Query to load parallel instances where t

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-12-14 Thread dykang
Sorry, I didn't clarify, I was speaking about with 0.3, not with 0.4. On Dec 14, 11:25 am, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Dec 14, 2007, at 1:34 PM, dykang wrote: > > > > > > > This example can't work in this sequence, or this query can't be run > > and mapped? > > If I wanted to ex

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-12-14 Thread Michael Bayer
On Dec 14, 2007, at 1:34 PM, dykang wrote: > > This example can't work in this sequence, or this query can't be run > and mapped? > If I wanted to execute this query: > SELECT inner_query.test_id AS inner_query_test_id, > inner_query.test_other_id AS inner_query_test_other_id, > inner_query.test

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-12-14 Thread dykang
This example can't work in this sequence, or this query can't be run and mapped? If I wanted to execute this query: SELECT inner_query.test_id AS inner_query_test_id, inner_query.test_other_id AS inner_query_test_other_id, inner_query.test_active AS inner_query_test_active, inner_query.test2_id AS

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-12-14 Thread Michael Bayer
this example as is cant really work in any version because the query doesnt know to map the "s2" alias to the mappers that its using, so you have to explicitly connect them. 0.3 has more limited capability to do this. anyway in 0.4 you can do it like this: print session .query (Test

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-12-14 Thread dykang
Hi, I was looking at this bug fix, and I couldn't figure out where part 2 of the problem was actually fixed. If you can ignore the absurdity of this example, it shows a situation where the second problem still appears to exist: from sqlalchemy import * from sqlalchemy.orm import * metadata = Me

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-10-17 Thread Michael Bayer
On Oct 17, 2007, at 4:07 AM, klaus wrote: > > Thanks a lot! The solution is so simple that I feel a little > embarassed... > im embarrased that bug's been present for so long ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-10-17 Thread klaus
Thanks a lot! The solution is so simple that I feel a little embarassed... On 16 Okt., 18:15, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Oct 16, 2007, at 10:45 AM, klaus wrote: > > > > > The only thing that I could find out about the reason is that in > > engine/base.py (1290) > >context.c

[sqlalchemy] Re: SQL error for mapped select (new in version 0.4) on PostgreSQL

2007-10-16 Thread Michael Bayer
On Oct 16, 2007, at 10:45 AM, klaus wrote: > > The only thing that I could find out about the reason is that in > engine/base.py (1290) >context.column_labels > contains the wrong entries. It should contain something like >{..., '_': '_', ...}. > In the case above, however, it contains >