Nevermind,
I forgot the
query.setFetchingDataRows(true);
Thanks
Frank
----- Original Message -----
From: "Frank" <farocc..otmail.com>
To: <use..ayenne.apache.org>
Sent: Wednesday, May 09, 2007 1:41 PM
Subject: Null value for 'ticketId'
Hello,
I am trying to get a count of records from mysql.
I keep getting this error.
Null value for 'ticketId'. Snapshot:
org.objectstyle.cayenne.DataRo..58689a[values={COUNT(*)=5},
version=-9223372036854775802, replaces=-9223372036854775808]. Prefix: null
here is my code:
String sql = "SELECT COUNT(*) AS cnt FROM tickets";
SQLTemplate query = new SQLTemplate(tickets.class, sql);
List list = context.performQuery(query);
Map row = (Map)list.get(0);
String cnt = row.get("cnt").toString();
Thanks
Frank
This archive was generated by hypermail 2.0.0 : Wed May 09 2007 - 13:48:51 EDT