Hello everyone,
I tried to update an address of a person in a single transaction, the main problem is that not having the necessary methods to change an address directly from the person I tried to remove the old and adding the address as new but I Hibernate throw an exception:
The row has been updated or deleted by another transaction .
I think it's impossible to update an old address of a person an then update the related person !
How can i do it?
Why in Person class i have all the method to get the right address and I haven't all the methods to modify them?
Is it right to introduce a method with the follow signature inside Entity class?
public void updateAddress(Address old,Address new_) ?
Waiting for your reply