on 01-05-2005 3:53 PM
Hello,
my EJB Query hast multiple Results.
My Table:
key | value
-
-
01 | test1
02 | test2
My Selection:
select Object(b) from PhoneBookEntityBean b
What kind of result type must the finder method have and how can i handle it?
Thanks for help and ideas,
André
Problem solved,
I found my failure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I'm having problem with my finder method also...
I have a finder with name findByEmpName in which I pass string empname as parameter, for this I have put following in my ejb-jar.xml:
<query>
<query-method>
<method-name>findByEmpName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>select object(b) from TestEntityBean b where b.empName like ?1</ejb-ql>
</query>
and inside persistent.xml
<finder-descriptor>
<method-name>findByEmpName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<load-selected-objects/>
</finder-descriptor>
but when I use this finder method in my jsp, it return me null (no rows) but corresponding row is present in the database, findByPrimaryKey and create are working fine...
Is any other setting need to be done?? pls help!!
~Raj
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.