Vorrei sapere se è possibile avere subquery in un'annotazione @query (org.springframework.data.jpa.repository.Query;)SpringData: è possibile avere subquery nell'annotazione Query?
sto ottenendo un QuerySyntaxException al primo Parentesis sottoquery.
Ecco la mia domanda
@Query(value="select c1 from ComplaintModel c1, "
+ "(select c2.id, min(cb.termDate) minDate from ComplaintModel c2 "
+ "join c2.complaintBullets cb join cb.status s where s.code = ?1 "
+ "group by c2.id) tmp where c1.id = tmp.id order by tmp.minDate")
Grazie!
Non si tratta dei dati di primavera, credo che non sia possibile farlo anche in JPQL. –