0 Replies Latest reply on Jul 23, 2002 11:02 PM by ahbbxie

    Why I cannot use jboss-ql in my application?

    ahbbxie Newbie

      When I want to query for something in my database I need some query clause for example LIKE ORDER BY .But ejb-ql can not provide them ,I want to user jboss-ql.I wrote some sentences in jbosscmp-jdbc.xml like
      <query>
      <query-method>
      <method-name>findByKey</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <jboss-ql>
      SELECT DISTINCT OBJECT(o)
      FROM Message o
      WHERE o.messageBody LIKE ?1
      </jboss-ql>
      </query>
      but in ejb-jar.xml
      <query>
      <query-method>
      <method-name>findByKey</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql> </ejb-ql>
      </query>

      when i deploy jboss throw exception:FROM NOT FOUND
      I was puzzled for a whole day,Can you help me?