You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Entity with a field of type String[], mapped to a PostgreSQL database with a text[] column.
With Spring Data JDBC (Spring Boot 3.3.1), when using JdbcAggregateOperations.findAll API (or others like findOne) the result entity for this field is null when the column is empty.
I'm expecting the following results:
column has multiple values -> result is a String array with these values
column is null -> result is null
column is empty -> result is an empty String array.
The third case returns null instead of an empty array.
I have made a reproduction repo: https://github.com/Jul13nT/spring-data-jdbc-empty-array
You can run the CustomerRepositoryTest to see the problem. The first customer has two values, the second one has null value and the third one as well (but should be empty).
The text was updated successfully, but these errors were encountered:
I have an Entity with a field of type
String[]
, mapped to a PostgreSQL database with atext[]
column.With Spring Data JDBC (Spring Boot 3.3.1), when using JdbcAggregateOperations.findAll API (or others like findOne) the result entity for this field is
null
when the column is empty.I'm expecting the following results:
The third case returns null instead of an empty array.
I have made a reproduction repo: https://github.com/Jul13nT/spring-data-jdbc-empty-array
You can run the CustomerRepositoryTest to see the problem. The first customer has two values, the second one has null value and the third one as well (but should be empty).
The text was updated successfully, but these errors were encountered: