This content has been marked as final.
Show 1 reply
-
1. Re: ejb-ql - search function
dhinojosa Nov 6, 2002 5:48 PM (in response to cwu9t9)You can't use LIKE with ejb-ql. Its the law according to O'Reilly's EJB book and I am assuming that the spec agrees with that notion!
To overcome the situation, duplicate your in the jbosscmp-jdbc.xml and replace ejb-ql with jboss-ql and you'd be finer than a girl with shaved legs.
I modified the below for you. Also make sure that when you send the your param in, that it has your appended '%' to it.
<query-method>
<method-name>findByVendor</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<jboss-ql>
<![CDATA[SELECT OBJECT(i) FROM T_Item i WHERE i.vendor.name LIKE ?1]]>
</jboss-ql>