[prev in list] [next in list] [prev in thread] [next in thread]
List: turbine-torque-user
Subject: Re: ORDER BY and torque generated column names
From: Thomas Vandahl <tv () apache ! org>
Date: 2008-10-07 16:57:58
Message-ID: 48EB9516.3060900 () apache ! org
[Download RAW message or body]
Manaster, Carl wrote:
>> APeer.doSelect(criteria);
>
> I think the issue is that when you ask APeer to select, it will select
> only the fields from a; it's telling you that you can't ORDER BY
> b.underwriting_year because that is not one of the columns in a. You
> could specify with addSelectColumn() exactly which columns you want to
> select and use BasePeer.doSelect() instead of APeer.doSelect, but that
> will give you com.workingdogs.village Records rather than a's, if that
> matters.
doSelect() checks if there are already columns added and if so skips
that step. So to make Postgres happy *and* keep the Peer features you
could use (order is important!)
APeer.addSelectColumns(criteria);
BPeer.addSelectColumns(criteria);
List results = APer.doSelect(criteria);
Bye, Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic