0 Replies Latest reply on Aug 2, 2004 7:28 AM by ikigovenku

    <ejb-ql> and FOR UPDATE

    ikigovenku Newbie

      Hi,

      Please let me know what is the wrong with the following query. Iam using FOR UPDATE with findByPK...


      <query-method>
      <method-name>findByPrimaryKey</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>java.lang.String</method-param>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <jboss-ql><![CDATA[SELECT OBJECT(o) FROM IkgInProcessScenario o WHERE o.uniqueId = ?1 AND o.packageName = ?2 AND o.scenarioName = ?3 FOR UPDATE]]></jboss-ql>

      It is giving following Error:

      org.jboss.deployment.DeploymentException: Error compiling JBossQL statement 'SELECT OBJECT(o) FROM IkgInProcessScenario o WHERE o.uniqueId = ?1 AND o.packageName = ?2 AND o.scenarioName = ?3 FOR UPDATE'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "FOR" at line 1, column 116.
      Was expecting one of:

      "AND" ...
      "OR" ...
      "LIMIT" ...
      "OFFSET" ...
      "ORDER" ...
      )

      Thanks in Advance

      -Venku