You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Carles Duque <cd...@eic.es> on 2004/04/14 14:53:47 UTC
Select MAX
I have a problem with this type of select. This is my code:
**************
Criteria crit =3D new Criteria();
org.apache.ojb.broker.query.ReportQueryByCriteria query =3D new =
ReportQueryByCriteria(Estudiant.class, crit);
query.setColumns(new String[] { "MAX(ID)" });
Iterator iter2 =3D broker.getReportQueryIteratorByQuery(query);
***********
But I don't know how return this iter2.next(). An Object of nothing... =
because It generate ClassCastException with Estudiant, Long, Integer and =
Double.
Anyone Can help me? Thanks!!
Carles Duque
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org