1 Reply Latest reply on Mar 8, 2004 4:53 AM by aquila125

    EJB-QL error

    aquila125

      Hi there,

      when trying to deploy some entity beans I get an error about the query I was using to test the deployment. Why doesn't the ?1 work?



      Error compiling EJB-QL statement 'SELECT DISTINCT OBJECT(rpp)
      FROM ReferenceProductPriceCMPEJB AS rpp
      WHERE rpp.pricelistReleaseCMP = ?1'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 3, column 57.
      Was expecting one of:
      <IDENTIFICATION_VARIABLE> ...
      <ENTITY_VALUED_PARAMETER> ...
      <ENTITY_VALUED_PATH> ...
      )]


      This is the the query part of the ejb-jar.xml


      Find all reference products on a certain pricelistrelease
      <query-method>
      <method-name>findByPricelistrelease</method-name>
      <method-params>
      <method-param>java.lang.Long</method-param>
      </method-params>
      </query-method>
      <ejb-ql>
      <![CDATA[
      SELECT DISTINCT OBJECT(rpp)
      FROM ReferenceProductPriceCMPEJB rpp
      WHERE rpp.pricelistReleaseCMP = ?1
      ]]>
      </ejb-ql>