I have created new spring boot project with postgresql .I like to use posgressql array_agg(ex:get all department) using JPA Repository native query but its getting some error in blow posted. I have tried some alter solution but cant able to get expected data.
Error :
org.springframework.orm.jpa.JpaSystemException: No Dialect mapping for JDBC type: 2003; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: 2003
Expected : Should get array or list of data
@Repository
public interface PostGroupRepository extends JpaRepository<PostGroup, Integer> {
@Query(value = "SELECT array_agg(department) FROM boxinfo;", nativeQuery = true)
public Object[] getDept();
}
