No Dialect mapping for JDBC type: 1111

I got the same error because my query returned a UUID column. To fix that I returned the UUID column as varchar type through the query like “cast(columnName as varchar)”, then it worked.

Example:

public interface StudRepository extends JpaRepository<Mark, UUID> {

    @Modifying
    @Query(value = "SELECT Cast(stuid as varchar) id, SUM(marks) as marks FROM studs where group by stuid", nativeQuery = true)
    List<Student> findMarkGroupByStuid();

    public static interface Student(){
        private String getId();
        private String getMarks();
    }
}

Leave a Comment