do not use addSelectColumn if passing a criteria to a torque generated
Peer. You can use it when accessing BasePeer directly. Peers select
all columns and expect them in the correct order.
john mcnally
Hristo Kosev wrote:
>
> Hi,
> I have some problems with building my Criteria.
> When I use addSelectColum method to get just some of
> the columns from my table I get this Exception:
>
> java.lang.reflect.InvocationTargetException:
> com.workingdogs.village.DataSetException: Only <N>
> columns exist!
>
> Where <N> is number representing the number of columns
> I try to select. Only when I addSelectColumn all of
> the table columns the doSelect succeeds but that's
> annoying.
>
> Also if I select the columns(with addSelectColumn) in
> order other than they appear in the table there's some
> strange behavour. For example:
>
> I have table A and APeer
> table A -> ID, NAME, DESCRIPTION
> if I do:
> criteria.addSelectColumn(APeer.ID);
> criteria.addSelectColumn(APeer.NAME);
> criteria.addSelectColumn(APeer.DESCRIPTION);
>
> A.getName() returns the correct column(A.NAME)
> but if I do:
> criteria.addSelectColumn(APeer.ID);
> criteria.addSelectColumn(APeer.DESCRIPTION);
> criteria.addSelectColumn(APeer.NAME);
>
> A.getName() returns the A.DESCRIPTION column.
>
> Is it a bug or am I doing something wrong?
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]