Hey folks,
at first the basics:
Hibernate version: 3.3.1.A with hibernate Annotations 3.4.0 GA
Code between sessionFactory.openSession() and session.close():
handled by Spring; I'm just calling the dao with personDao.update(personObject);
Name and version of the database you are using:
PostgreSQL 8.3
so, we have three entities:
Person, Address, Country
Person is associated to address and address is associated to country - all associations are OneToOne.
Some days ago when setting in Address the Country to a new value and called
personDao.update(person);
all changes were persisted to the database as required (Person was updated and Address as well, but only when changes were made to the entity).
But as of today, it only executes an update for Person, but not for address when changing the country (or other properties).
How can that be? When setting the cascade=CascadeType.ALL property it executes an update on the address EVERY time, even if there was no change which is quite inefficiently.
Any help on that?
Thanks in advance!
|