db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Göschl,Siegfried" <Siegfried.Goes...@drei.com>
Subject RE: select only on column
Date Fri, 19 Dec 2003 08:47:15 GMT
Hi Joerg,

you might have a look at the underlying Village library used by Torque. Below you find a code
snippet fro a JUNIT test using a prepared SELECT statement using Torque and Village.

Cheers,

Siegfried Goeschl

>>> Code Snippet >>>

// Get a single product
Product product  = ProductPeer.retrieveByPK( this.productKey1 );
// Define all the columns we want to select
CartorderposPeer.addSelectColumns( criteria );
// Add our criteria
criteria.add( CartorderposPeer.PRODUCTID, product.getPrimaryKey() );
// Get a list of Village Records
recordList = CartorderposPeer.doPSSelect( criteria );
// Convert them into Database classes
cartOrderPosList = CartorderposPeer.populateObjects( recordList );

<<< Code Snippet <<<

-----Original Message-----
From: Rutzen, Joerg [mailto:Joerg.Rutzen@t-systems.com]
Sent: Friday, December 19, 2003 5:44 AM
To: 'torque-user@db.apache.org'
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: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message