Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Findby Query  RSS feed

 
geeta Paygude
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI

I am using EJB2.1
I have following requirement...

oCollection = oContactLocalHome.findByMailId(szForMailId);
so if append "@yahoo%" to above parameter it fails to serch that email id in db
eg now the call looks like
oContactCollection = oContactLocalHome.findByMailId(oContactVO
.getEmail()
+ "@yahoo%");
This gives me finder exception since in my db i have entry as
geet_p@yahoo.com where as parameter i am passin is geet_p

And i dont want to modify my EJBQL, it looks like
<query>
<query-method>
<method-name>findByMailId</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) from contactschema AS o WHERE o.email like ?1]]></ejb-ql>
</query>
<query>

Is there any solution
What query is build internally? i am using jboss server

Please reply ASAP
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!