I want to select one column ('foo') from a table ('bar') which has five
columns. The SQL is:
SELECT bar.foo from bar.

So I have the following:

Criteria c = new Criteria();
c.addSelectColumn(BarPeer.FOO);
BarPeer.doSelect(c);

The SQL generated by Criteria is what I want but I got the following
exception:

com.workingdogs.village.DataSetException: Only 1 columns exist!
        at com.workingdogs.village.Record.getValue(Record.java:546)
        at BaseBarPeer.populateObject(BaseBarPeer.java:165)
        at BaseBarPeer.row2Object(BaseBarPeer.java:146)
        at BaseBarPeer.populateObjects(BaseBarPeer.java:238)
        at BaseBarPeer.doSelect(BaseBarPeer.java:174)

I'm using Oracle 8i and the column is not a primary key. It seems like
it's a village problem. But I couldn't find anything from village's
mailing list. Thanks in advance,

Howard Lin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to