db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenji Ichikawa <ichik...@seta.co.jp>
Subject addGroupByColumn()
Date Thu, 04 Mar 2004 07:30:53 GMT

Hi, I'm ichikawa.

I have a problem while I am developing a portlet of Jetspeed 1.4
with Torque-3.0.2 and PostgreSQL 7.3.4, j2sdk 1.4.1

I would like to execute this SQL,

SELECT login_name FROM turbine_user GROUP BY login_name

( column login_name is defined as VARCHAR )

so, I typed Java source code like this.

Criteria crit = new Criteria();
crit.addSelectColumn( TurbineUserPeer.LOGIN_NAME );
crit.addGroupByColumn( TurbineUserPeer.LOGIN_NAME );

List result = TurbineUserPeer.doSelect( crit, conn );

But, method doSelect() always throws DataSetException
of Village, exception message is

"Bad conversion: java.lang.NumberFormatException: For input string: "admin""

I debuged source code of Criteria to confirm the SQL, it is


There is no error of the SQL with pgsql of PostgreSQL,
so I wondered why the exception was thrown.

I thought Village had some bugs, and I replaced Village with
the latest one 'village-2.0-dev-20030825.jar' from Torque 3.1
source code archive, but the exception also was thrown in
this case.

Could you give me advice to execute the SQL for "GROUP BY"
with Criteria ?

Kenji Ichikawa

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

View raw message