cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank" <>
Subject Null value for 'ticketId'
Date Wed, 09 May 2007 17:41:06 GMT

I am trying to get a count of records from mysql.
I keep getting this error.

Null value for 'ticketId'. Snapshot: org.objectstyle.cayenne.DataRow@158689a[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();



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message