When using @CollectionTableCollectionTable in nullable @Embedded, entity always got not-null reference even if no data. Example project to reproduce issue, contains problem entity:
Hello @Anton_Ram, I don’t think there’s a way to do this with @ElementCollection, as Hibernate has no way of distinguishing between a null association and an empty collection when there’s no record in the collection table.
Why do you need to make this distinction in the first place?
To rich event consistency. We can receive link to object before real data and create “empty” entity with only id. When real data received we will enrich created entity, but this topic now has no meaning as this feature is deprecated as i see