0 Replies Latest reply on Feb 10, 2005 7:00 PM by Wanjun Wang

    Does JBoss support CMP without primary key?

    Wanjun Wang Newbie

      I try to use a CMP without PK in JBoss 3.2.5, but have the following exception from the finder method:


      2005-02-10 18:27:32,540 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Transaction#findAll] Executing SQL: SELECT FROM MYTABLE t0_t
      2005-02-10 18:27:32,590 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Transaction#findAll] Find failed
      java.sql.SQLException: Syntax error or access violation message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM MYTABLE t0_t' at line 1"
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
      ......

      The executed SQL statement looks messed up. Is there any XDoclet tag that I need to specify? Thanks in advance.