Quote:
Some of the hibernate debug output indicates that each batches.put (...) call should force a DB update resetting the key to the correct generated ID value. This is not happening.
I have never seen anything like this. Updates to the db may be delayed as long as until commit is called. Even if the db update should happen immediately it wouldn't work since the key in a map is not allowed to change since it will mess up the map if it does.
If you want to use the primary key as a map key I think you need to manually assign the primary key values and not rely on Hibernate for generating this.
Or, you could choose to not use the map for insertions. After all, the important thing for making things work is that you have set the HibEntBatch.account property to the correct parent item. The drawback is that you will not be able to take advantage of cascades for saving child items.