If anyone has updated their hibernate jar to the latest 3.1.2 version and updated their code to use the merge method to save objects then you probably noticed that the ID for newly created objects is not populated in the saved object like it used to be.
Spring has a class called, IdTransferringMergeEventListener which merges the ID of the newly created object with the object that your application holds. Open up this class and read the comment about how the current implementation only works for 3.0 versions of Hibernate.
So if you use the Spring 1.2.6 or better, and hibernate 3.1.2 you will need to create an implementation of this event listener that implements the commented out version in the above class.
Monday, March 06, 2006
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment