https://kotlinlang.org logo
Title
u

user

07/21/2022, 8:01 AM
Dynamic where clause for Spring Data JPA native query I have a pretty big native query in my Hibernate orm.xml. I can't easily translate this to HQL or Criterias, but I'd like to have a dynamic where in this query. It seems TypedQueries isn't a good idea because of SQL injection, Predicates cannot be combined with native queries, so what alternatives are there to create a dynamic where clause? The dynamic where I have to build are things related to ranges (between), lists (in queries, etc. I was hoping to create a Predicate and inject it in my...