http://opensource.atlassian.com/projects/hibernate/browse/HHH-3223
Please have a look at PersistentMap.remove() and compare it to PersistentMap.put(). The put() was fixed HHH-2476 and the same fix needs to be applied to remove().
Please refer to HHH-2584 for the patch:
http://opensource.atlassian.com/project ... e/HHH-2584
Copied from HHH-2584:
Essentially, an uninitialized PersistentMap loses the first remove() into it if defined as non-extra-lazy.
The underlying cause is the code in PersistentMap#remove() which attempts to readElementByIndex(). In the case of non-extra-lazy, readElementByIndex() returns the UNKNOWN marker object which is supposed to be used to signal that the delegate map is now initialized and to remove the element directly from the map. Long story short, PersistentMap#remove() does not properly check the return value from readElementByIndex() and react accordingly.
--------------------------------------------------
Could someone with Hibernate commit access PLEASE fix this bug? It would take all of 1 minute to fix this issue...