Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Query

 
Vicky Vijay
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I need query and the details are below,

TABLE COLUMN VALUE ==> "javaranch"

In the Application, i will be providing the search string as ==>
INPUT Parameter

*v*r*

or

*v*

or

j*r*


OUTPUT should be "javaranch"

the results ("javaranch") should be retrieved ONLY if the given string matches (contains) the content in the table column

 
Claudiu Chelemen
Ranch Hand
Posts: 75
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And can't you use the LIKE operator ? Just replace * with % and use LIKE (or add a Restrictions.like(...) to the Criteria).

Cheers
Claudiu
 
Vicky Vijay
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works

Thanks !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic