@Strong Liu - Thank you very much, the workaround works like a charm. The embedded object is not being reset to null and somehow Hibernate also handles correctly empty object as "not dirty". Btw. I did only the 3rd step (changing the property setter). Non Adding non -nullable property is not necessary (there is none in your test case as well ... and such workaround would be unacceptable ). {code} public void setMyEmbeddedObject(MyEmbeddedObject myEmbeddedObject) { if (myEmbeddedObject != null) { this.myEmbeddedObject = myEmbeddedObject; } } {code}
|