Reputation: 618
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?
Upvotes: 1
Views: 2167
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