Quote:
You should do this logic in the setter and/or getter methods. Thats what they are there for, right?
When I add a check in the setter i.e
Code:
public setAddress(Address newAddress) {
if(newAddress!=null) this.address = newAddress;
}
hibernate issues a new update to the customer at the end of the transaction. I would like to avoid this.
Quote:
If you mapp this as a one-to-one, and give Adress a propper ID, it should work ...
Doesn't that mean that i will have to create a mapping file for Address? Since I will have many classes like Adress i'd rather not create separate mappings for them all.