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

About dynamic query in chapter 7 of JPA Pro 2nd edition

 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, the book shows a query:


The book says the query created will have a single quote prefix of empName like this:
SELECT e.salary  FROM Employee e WHERE e.department.name = 'NS65' AND e.name = ''Roberts' ;

Roberts becomes 'Roberts. And it won't find Robert's record.
However, after I tried a few times with this created query, it can find the Robert's record.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic