Hello everyone,
I'm working on a project where I have a object 'RO' that has a list of "PULabel". The type of my PULabel in my database is a "SLabel". The object RO has other "SLabel".
I'm working on a query that return all the last "PULabel" of every RO object.
I have written someting like this :
SELECT s
FROM ReturnOrder r
JOIN (SELECT s FROM r.pickUpLabel LIMIT 1)
ORDER BY s.persistenceId ASC
But it's look like it's not a correct query, the compiler does not like the parentheses "(" and the "LIMIT". Is it possible de make a sub request in a JPQL query ?