Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!

Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB-QL: how to use LIKE with input variable?  RSS feed

Bruno Collet
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I simply pass the search term, then the following code does not return any result (although there should be some).

When surrounding the input parameter with %, then JBoss throws an exception at deployment, saying that % should not be there.

In the end, I surrounded the search term with % before calling the finder method, which in my opinion is quite ugly Ugly but it works.

Any idea on how to correctly specify a LIKE search term with input parameter in EJB-QL?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!