JPA Projection with custom collection property
问题 We are using Spring Data and trying to create a custom query with a subquery, results projection have an array and other properties, our problem is with the subquery array. public interface ProfesionalRepository extends JpaRepository<Profesional, Long> { @Query("SELECT p.id as idProfesional, " + " p.name as name, " + " p.surname as surname, " + " (SELECT a.descripcionIlt FROM Ausencia a WHERE a.profesional.id = p.id) as exclusionesCenso " + " FROM Profesional p ") List