This content has been marked as final.
Show 1 reply
-
1. Re: findByXXX method causes ejb spec violation
ioparra Sep 23, 2003 12:36 PM (in response to mortena)you need to specify the findQL in your descriptors.
In your ejb-jar.xml, after your cmp-field/primkey-field, add a query like this:
<cmp-field>...</cmp-field>
<primkey-field>..</primkey-field>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>
java.lang.String
</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(barl) from foo as bar where bar.name=?1]]></ejb-ql>
See if that works.
-Ivan