[sqlalchemy] Re: Is this SQLAlchemy's bug? The result come differently from session's query and plain sql which built by session's query.

2009-03-16 Thread Michael Bayer
On Mar 16, 2009, at 10:48 PM, Alisue wrote: > > Hey thanks! I figured out but I still don't know why... > > subquery = query.subquery() > minroom = meta.Session.query(subquery.c.property_id, func.min > (subquery.c.house_rent).label('minprice')) > minroom = minroom.group_by(subquery.c.property_id

[sqlalchemy] Re: Is this SQLAlchemy's bug? The result come differently from session's query and plain sql which built by session's query.

2009-03-16 Thread Alisue
Hey thanks! I figured out but I still don't know why... subquery = query.subquery() minroom = meta.Session.query(subquery.c.property_id, func.min (subquery.c.house_rent).label('minprice')) minroom = minroom.group_by(subquery.c.property_id) minroom = minroom.subquery() query = meta.Session.query(m

[sqlalchemy] Re: Is this SQLAlchemy's bug? The result come differently from session's query and plain sql which built by session's query.

2009-03-16 Thread Alisue
Oops. actually the out put was the below... sorry 11:34:23,867 INFO [iyeiye.lib.search.wringout] - 11:34:23,887 INFO [sqlalchemy.engine.base.Engine. 0x...e8ec._beg

[sqlalchemy] Re: Is this SQLAlchemy's bug? The result come differently from session's query and plain sql which built by session's query.

2009-03-16 Thread Alisue
Well... sorry I can't find the issue from my code and output. ---output-- 11:25:02,197 INFO [iyeiye.lib.search.wringout] - 11:25:02,220 INFO [sqlalch

[sqlalchemy] Re: Is this SQLAlchemy's bug? The result come differently from session's query and plain sql which built by session's query.

2009-03-16 Thread Michael Bayer
the Query will consolidate multiple rows with the same primary key into a single object instance - comparing the rows returned by the two different approaches will reveal the source of the issue. set echo='debug' to see that output. Alisue wrote: > > SQLAlchemy: 0.5.2 > SQLite: 3.5.9 > MySQL