| Gabriel Macerot, Hibernate's PersistentMap literally wraps the Map returned by MyEntity#getMyEnumsByProperty. In your debugger, set a breakpoint inside your setter, and expand the argument ({myEnums}}. You will see that myEnums.map has the exact same reference as this.myEnumsByProperty. When you clear this.myEnumsByProperty, you are also clearing myEnums.map. What you are seeing is expected. If you have any other questions, use the forum. |