Closed
Description
Given an @Embedded.Nullable
on a property whose object contains a property with a collection type, e.g. list (backed by a varchar array in the DB), the annotated object is returned non-null even for a null value of this collection.
data class Entity(
@Embedded.Nullable
val embedded: EmbeddedObject?
) {
@Id
var id: Long? = null
}
data class EmbeddedObject(
@Column("values")
val values: List<String>?
)
For a row with values = null
, the mapper results in the embedded
property being a non-null object, and its property values
is null
.
I guess this is a bug, as it goes against the documented behavior:
the load strategy for the embedded object if all contained fields yield null values.
which should hold for an embedded with a single collection field yielding a null value.
version: 3.2.2