|
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?
|