2 Replies Latest reply on Aug 22, 2002 4:48 AM by lynke

    Generated SQL misses table name

    lynke

      This is probably something simple I have overlooked but if anyone could point out what I am missing I would be mighty grateful. I have a finder declared through xdoclet

      @ejb:finder
      signature="Collection findByCheckPointIDAndTop(java.lang.String checkPointID, java.lang.String top)
      transaction-type="Required"
      query="SELECT DISTINCT OBJECT(o) FROM CheckPoint o WHERE o.checkPointID=?1 AND o.top=?2"

      which prompts the output from JBoss 3.0.1 when the finder is deployed of:

      [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CheckPoint.findByCheckPointIDAndTop] EJB-QL: SELECT DISTINCT OBJECT(o) FROM CheckPoint o WHERE o.checkPointID=?1 AND o.top=?2
      2002-08-19 16:33:41,734 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CheckPoint.findByCheckPointIDAndTop] SQL: SELECT t0_o.checkpoint FROM t0_o WHERE t0_o.checkPointID = ? AND t0_o.top = ?

      and gets an object not found from the database call - it appears to lose the table name somewhere??

      Any help would be appreciated.

      Lynke.

        • 1. Re: Generated SQL misses table name
          dsundstrom

          My guess is XDoclet is generating a jbosscmp-jdbc.xml file with an empty table-name element. I suggest you use XDoclet from the xdoclet cvs head.

          • 2. Re: Generated SQL misses table name
            lynke

            Thanks very much!! You were absolutely right - I had overlooked the jbosscmp-jdbc.xml ...

            I am using the head cvs XDoclet but the jboss examples were still using @jboss:table-name instead of ejb:persistence table-name=""

            Thanks again for pointing me in the right direction.