use "crit.addSelectColumn(SomePeer.SOME_COLUMN)" and use
"SomePeer.doSelectVillageRecords(crit)", eg.:
//tell criteria to select the pid-column only
crit.addSelectColumn(FileReferencePeer.PID);
try
{
results = FileReferencePeer.doSelectVillageRecords(crit);
}
catch (TorqueException e)
{
logger.error("Fetching primary keys for FileReference failed!",
e);
throw new BaseException(e);
}
Iterator it = results.iterator();
List pids = new ArrayList();
while( it.hasNext() )
{
Record record = (Record)it.next();
BigDecimal pid = null;
try
{
//record.getValue(1) will work too
pid =
record.getValue(FileReferencePeer.PID).asBigDecimal();
}
catch (DataSetException e1)
{
logger.error(e1.getMessage());
throw new BaseException(e1);
}
pids.add(pid);
}
so long
Micha
> -----Original Message-----
> From: Rutzen, Joerg [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 19, 2003 5:44 AM
> To: '[EMAIL PROTECTED]'
> Subject: select only on column
>
>
> hi,
> is there a possibility to select only one column.
> if i code this
>
> ... Criteria crit = new Criteria();
> crit.add( EinsatzAbPeer.NAME, "Meyer" );
> try
> {
> list = EinsatzAbPeer.doSelect( crit );
>
> ...
>
> the statement is actually about a the table.
> How do i have to change the doSelect , if i only want to have the NAME
>
> Regards
>
> J�rg
>
>
>
> ---------------------------------------------------------------------
> 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]