i have this query in repository on java with spring framework
@Query(value = "SELECT cr.reviewer_name, cr.message, cr.rating, cr.source, cr.show_status, cr.created_date, " + "cr.group_index, string_agg(cr.type, ',') " + "FROM customer_review cr " + "WHERE cr.type LIKE 'NEWCAR%' AND cr.object_code = :objectCode AND cr.is_deleted NOT IN (true) " + "GROUP BY cr.reviewer_name, cr.message, cr.rating, cr.source, cr.show_status, cr.created_date, cr.group_index " + "LIMIT :limit OFFSET :offset", nativeQuery = true) List findByObjectCode(@Param("objectCode") String objectCode, @Param("limit") Integer limit, @Param("offset") Integer offset); i've make sure the table name exactly the same with the query but it always say error
The column name group_index was not found in this ResultSet. i have try to rewrite the query, and run it manually on postgres and its works but when i use it on my repository interface it got error like that
here my tabel

Источник: https://stackoverflow.com/questions/781 ... pring-java
Мобильная версия