Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJBQL Question  RSS feed

 
Sam Wang
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a finder method to query the client's name.
SELECT OBJECT(a) FROM XXX AS a WHERE a.name LIKE...
My question is the expression '%'+?1+'%' is wrong.
The result of the expression '%?1%' is not my desire.How to merge input parameter with '%' or
'_'.
 
Sam Wang
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I know all ranchers are too busy to help a
new java fan!
After try many times,last night I overcome the EJBQL question.The answer is add "%"+parameter+"%" in my session facade before my entity finder method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!