jw3525 wrote:
If you really think of it the current behavior makes sense.
It makes sense in some cases. In my case it's not a useful behaviour. As the Hibernate documentation says, null value semantics are ad-hoc. Hibernate has picked one implementation, and it happens to not work for us in the current situation. Our object model is such that we wish that particular composite element to always be initialised. It's not important whether its properties are set to null or left uninitialised, what's important is that the composite element is not null. This is the appropriate behaviour in our object model, and I'm asking for a way to implement this in Hibernate.
How hard would it be to write a UserType that extends the current composite element type and overrides this behaviour? Would that be possible?