What you can try to do is to use a postgresql function (if it exists) to convert the String to integer in the select statement. This should be accepted by Torque.
Thomas Sheldon Ross <sr...@simmgene.com> schrieb am 13.10.2009 00:23:42: > Von: > > Sheldon Ross <sr...@simmgene.com> > > An: > > Apache Torque Users List <torque-user@db.apache.org> > > Datum: > > 13.10.2009 00:28 > > Betreff: > > Criteria casting. > > 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-unsubscr...@db.apache.org > For additional commands, e-mail: torque-user-h...@db.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscr...@db.apache.org For additional commands, e-mail: torque-user-h...@db.apache.org