Null value for 'ticketId'

From: Frank (farocc..otmail.com)
Date: Wed May 09 2007 - 13:41:06 EDT

  • Next message: Frank: "Re: 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:41:44 EDT