Hi Carles, Report Queries return an Iterator of Object[]
Object[] objs = iter2.next(); Integer max = objs[0]; Hope this helps, Wally -----Original Message----- From: Carles Duque [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 7:54 AM To: [EMAIL PROTECTED] Subject: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
