• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Findby Query

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

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
+ "@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
<ejb-ql><![CDATA[SELECT OBJECT(o) from contactschema AS o WHERE o.email like ?1]]></ejb-ql>

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