-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Update reference not executed
PostPosted: Wed Oct 29, 2008 11:30 am 
Newbie

Joined: Wed Oct 29, 2008 11:19 am
Posts: 4
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.