Is it possible to query \"UNION\" in JPA and even \"Criteria Builder\"?
I\'m looking for examples, but so far i got no result.
Does anyone have any examples
One thing just comes to my mind (searching for the exact same problem):
Perform two different JPA queries on the same entity mapping and simply add the objects of the second result to the list (or set to avoid duplicates) of the first result.
That way you get the same effect as with a UNION, the difference being that you use two SQL statements instead of one. But actually, I would expect that to perform just as good as issueing one UNION statement.