Skip to content

Persisting empty list in spring data r2dbc v3.1.1 results in null value being inserted instead of empty array #1544

Closed as not planned
@jurriaan

Description

@jurriaan

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:

image

Metadata

Metadata

Assignees

Labels

status: supersededAn issue that has been superseded by another

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions