Questions tagged [criteriabuilder]
36 questions
0
votes
1 answer
How to implement sub queries with criteria builder in Spring JPA
I am trying to achieve this native query dynamically using a criteria builder
@Query(nativeQuery = true, value =
"""
SELECT * FROM unit_register
WHERE unit_nr IN (
SELECT DISTINCT(unit_nr)
…

Saurabh Sahu
- 25
- 4
0
votes
1 answer
How to write criteria to check multiple conditions for mongoOperations in java
Suppose collection is having 3 documents. For example:
{"document" : "001",
"requestType" : "A",
"valid" : "true"},
{"document" : "002",
"requestType" : "A",
"valid" : "false"},
{"document" : "003",
"requestType" : "B"}
Each document has 2 attribute…

Aman
- 23
- 3
0
votes
0 answers
Trying to filter a list column with Jpa specification and CriteriaBuilder
This is what I have so far, but it is obviously not working. I was thinking about creating a CriteriaBuilder.In for each of elements of the array from the column, but there has to be a better way to do it right? The code should give me elements that…

Jtho
- 1
- 1
0
votes
0 answers
CriteriaBuilder + Hibernate StatelessSession create sql
I am required to use StatelessSession because of the memory consumption when handling millions of rows and the method createQuery from sessions only accepts String.
The code looks like this:
StatelessSession session = ((Session) EntityManager
…

Hugo Marinho
- 1
- 1
0
votes
1 answer