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: Auditable Implementation problem
PostPosted: Mon Jun 23, 2008 3:55 pm 
Newbie

Joined: Sat Nov 04, 2006 5:14 pm
Posts: 4
We have a rather large application with over 100 tables arranged in a grandparent(GP) – parent(P) – grandchild(GC) arrangement. Each P table has its own .hbm file, but the GC tables are defined within the P tables using idbags. The grandchild tables primarily represent attributes such as color, etc. All tables have user and time stamp fields defined and the java classes all implement Auditable.

As you might imagine, this is a complex web form with multiple pages. We have taken the approach throughout of saving the grandparent object and allowing hibernate to sort out the objects that have changed. This works well.

Just before issuing the save/update, we call a method that walks the entire object and updates the stamps. Once the save has committed, we see that the grandchild objects (without their own .hbm file) are having the auditable fields persisted, but the parent objects (with their own .hbm file) don’t save the changes we made to the stamp fields. Other changes to the parent tables are persisted properly, but the stamps are ignored. I’ve run through the debugger and ensured that the values are set, but they are not persisted.

Can anyone offer an explanation as to why this might be?


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.