|
Consider something like @ElementCollection Map<[Entity], [@Embeddable]>.
If a component's properties are all null, we currently return null for the component itself – which makes sense in most contexts. Conceptually, Comp(null, null, ...) is the same as Comp == null. However, in the Map case, some users expect the component w/ all null properties to still be a value in the Map.
Steve Ebersole mentioned:
I guess conceptually I can see that for a Map where you want to keep a consistent set of keys for that role. Maybe even a List too for similar reasons.
In terms of supporting such a feature, I am not sure how simple it will be to do it just in these case(s). Would certainly be easier from a development standpoint to just allow setting this for all composites.
|