db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sheldon Ross <sr...@simmgene.com>
Subject Criteria casting.
Date Mon, 12 Oct 2009 22:23:42 GMT
So I have

Criteria subquery = new Criteria();
criteria.add(ThisObjectPeer.COLUMN_A,valueA);
criteria.addSelectColumn(ThisObjectPeer.COLUMN_B);

Criteria criteria = new Criteria();
criteria.add(TheOtherObjectPeer.COLUMN_C,subquery,Criteria.IN);


The only problem is COLUMN_B is an string, and COLUMN_C is an integer. 
Is there any way to add a cast in the subquery, or select column as an 
integer?

The new versions of Postgresql strongly enforce types and won't let you 
compare integer to character varying.

Any thoughts?
Thanks

-- 
Sheldon Ross
Software Development



---------------------------------------------------------------------
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