我想要执行下面的查询,但是当我使用object[]
作为返回类型时,它会给出“PersistentEntity must not null”的错误!这个查询的返回类型应该是什么?Spring Data Rest:查询的返回类型应该是什么
public interface PropertyRepository extends JpaRepository<Property, Long>,JpaSpecificationExecutor {
@Query(value="select p.city.name, count(p) from Property p join p.city group by p.city.id")
Object[] countPropertyInCities();
}
propery om? @hovanessyan – SFAH