[hibernate-dev] HHH-7610 Embedded: emptiness and dirtiness

Guillaume Smet guillaume.smet at gmail.com
Fri Oct 24 10:14:26 EDT 2014


Hi Steve,

On Fri, Oct 24, 2014 at 3:08 PM, Steve Ebersole <steve at hibernate.org> wrote:
> As to your specific question, yes I think what you propose makes sense.
> Namely, if this setting is enabled, I think it is reasonable to treat a null
> component reference and an empty component reference as equivalent.

Thanks for your feedback!

Isn't it even more reasonable to treat null and empty as equivalent in
the current behavior?

Currently, we have:
Entity with empty embedded -> save + get -> Entity with null
so we are considering that empty embedded and null are the exact same things.

If you set again the embedded to an empty one for various reasons,
it's going to be considered dirty again which is IMHO wrong.

I won't argue a lot about this as we will run all our applications
with this setting enabled but I think it will be a performance
improvement to fix this in the other case too.

Note that I'm not very familiar with these things so I might have
missed an obvious point.

We are going to fix the things you commented on Github, work on the
documentation and wait for your feedback on this specific point before
going further on this particular issue.

It would be nice to have it in the next 4.3.x release as we have an
application which is particularly affected by this issue.

-- 
Guillaume


More information about the hibernate-dev mailing list