This content has been marked as final.
Show 1 reply
-
1. Re: EJB-QL 'Like' Query
didi1976 May 12, 2003 2:59 AM (in response to klogg)Hi,
EJB-QL does not support LIKE ?1 instead you have to use JBossQL.
Therefore you have to put the definition of the finder into your jbosscmp-jdbc.xml file.
e.g.:
<ejb-name>YourBean</ejb-name>
...
<query-method>
<method-name>findByMatch</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<jboss-ql><![CDATA[
SELECT OBJECT(u)
FROM YourBean u
WHERE u.yourField LIKE ?1
]]></jboss-ql>