Hello!
I have a Customer object which contains a unidirectional collection (Set) of ContactPersons (embedded entities).
Cascading for this relation is set to "all,delete-orphans". It works correctly but what I'm wondering about is why Hibernate entirely deletes and re-inserts the ContactPersons every time I update the Customer.
The object graph is in detached state as I get it from a remote client.
I have implemented equals() and hashCode() according to the recommendations of the Hibernate documentation.
I'd appreciate any help.
Best regards,
Fabian
|