• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Building Dynamic Query in JPA

 
Shobha Korrapati
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Can anyone help me out how to bulid dynamic query in JPA ?

Thanks in advance
Shobha
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you elaborate. IN JPA you only have SQL and JP-QL, and in all those cases it takes a String to create the corresponding objects, so building a dynamic String to hold the query is really easy, the only thing to lookout in that case is the hacker that enters Strings in the UI that would hurt your database. That is what ":" variables are good for, to help protect you.

So how in depth is the dynamic query going to be?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic