• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Findby Query  RSS feed

 
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
 
We can walk to school together. And we can both read this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!