• 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: 17309
11
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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!