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 casterx <ca...@netzero.net> on 2003/08/17 19:18:42 UTC
Report Query Issue
I am trying to select a single column from a mapped table using a
ReportQuery. Here is my code:
Criteria criteria = new Criteria();
ReportQueryByCriteria query =
QueryFactory.newReportQuery(TeamCode.class,criteria);
query.setColumns(new String[] {"teamCode"});
System.out.println(broker.getCollectionByQuery(query).size());
The generated SQL is exactly what I need:
SELECT A0.TEAM_CODE FROM TC_TEAM_CODE A0
But then I get the following Error:
[org.apache.ojb.broker.accesslayer.RsIterator] ERROR: Error reading class
type: com.TeamCode from result set: Invalid column name
Do I need to have some GroupBy Statement in the Report Query and is this the
not right class for this type of an operation?
I'm using OJB rc4.
Any ideas?
Caster
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org