Sameera Manorathna
Sameera Manorathna

Reputation: 618

Querying JSON array from postgresql in hibernate throws No Dialect mapping for JDBC type: 1111

I'm using PostgreSQL database and having a JSON type column in a table. The JSON value which is stored there in the column is having an iterative section which i do need to be retrieved from the database as an list.

@Query(value = "SELECT json_array_elements(table_column_name->'BBList') FROM table_name", nativeQuery = true)
public List <Object[]> findJsonList();

And the query returns this error:

org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111

What would be the correct return type of this?

(see the JSON image

Upvotes: 1

Views: 2167

Answers (1)

shankarsh15
shankarsh15

Reputation: 1967

In this case , try using ->> operator:

Please see post below :

Execute Query based on the JSON that stored inside the column

Upvotes: 1

Related Questions