-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping empty postgres text[] column sets field to null in 3.3.1 #1826
Comments
I tried to reproduce the issue but failed Please provide a Minimimal Reproducable Example, preferable as a Github repository. Make sure to include the database, either as an in memory database or if that is not possible using Testcontainers. |
Here is the repo: https://github.com/Tree4Free/spring-data-jdbc-issue-1826 I used a postgres testcontainer because thats where I also discovered the issue in my code. (JDK used is 21) When changing the version of the |
As written in this comment #1737 (comment) after upgrading to spring-data-jdbc
3.3.1
when I load an entity with atext[]
column (mapped asList<String>
) that is empty usingfindById
the column is set tonull
.My guess is that bug was introduced by this issue #1737 but I didn't look into the changes to confirm that.
An example of my setup taken from the comment linked above:
Using a combination of Java + Kotlin:
My Entity: (Java + Lombok)
My database table (postgres):
My test case (Kotlin)
The text was updated successfully, but these errors were encountered: