-
Notifications
You must be signed in to change notification settings - Fork 356
Persisting empty list in spring data r2dbc v3.1.1 results in null value being inserted instead of empty array #1544
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
Comments
I'm not able to reproduce the issue. Converting an entity that contains an empty If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal sample that reproduces the problem. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
@mp911de I've set up a minimal sample here: https://github.com/jurriaan/issue-1544, seems that I cannot get it to persist non-empty lists of enums as well. |
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 think this is due to this commit:
c55ba78#diff-959f5816c3648926ab975cd65e6f5d130ab2f51607d7d2e7de40543223705c32L179
The empty array with an enum componentType is not processed properly and eventually a null is returned here:
The text was updated successfully, but these errors were encountered: