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
Opening a new ticket since I cannot reopen #1544 and the issue seems to also be present in the latest 3.0.x releases.
When updating from Spring v3.0.x to v3.1.1 we get the following database error when trying to persist an empty list of an enum type (kotlin emptyList()) to an array column in PostgreSQL:
null value in column "foo" of relation "bar" violates not-null constraint
I've created a small example project with a test that can reproduce the issue. It shows that it's not possible to persist arrays of enums, whether they are empty or not on spring-boot 3.0.9/3.1.x, but can on earlier spring boot versions:
mp911de
changed the title
Persisting lists of enums in 3.0.8 / 3.1.x results in null value being inserted.BasicRelationalConverter converts enum arrays to nullAug 23, 2023
Thanks for the reproducer. It contained the missing bit of retaining the enum type which has led to conversion into the null value.
The fix is now deployed as part of the latest 3.0.x, 3.1.x and 3.2.0 snapshots if you want to verify that the fix is working for you. Make sure to upgrade both, R2DBC and Relational artifacts.
Opening a new ticket since I cannot reopen #1544 and the issue seems to also be present in the latest 3.0.x releases.
When updating from Spring v3.0.x to v3.1.1 we get the following database error when trying to persist an empty list of an enum type (kotlin emptyList()) to an array column in PostgreSQL:
I've created a small example project with a test that can reproduce the issue. It shows that it's not possible to persist arrays of enums, whether they are empty or not on spring-boot 3.0.9/3.1.x, but can on earlier spring boot versions:
https://github.com/jurriaan/issue-1544
The text was updated successfully, but these errors were encountered: