| Currently, <composite-map-key> sub-properties are mapped as non-updatable when using HBM mappings because CompositeIdentifierSingularAttributeSourceBasicImpl#isUpdatable returns false. This does not seem to break anything currently because AbstractCollectionPersister only tracks whether an index is "settable": indexColumnIsSettable[i] = indexColumnInsertability[i] || indexColumnUpdatability[i]; Annotations supports: @MapKeyColumn(name = "...", insertable = true, updatable = false) Currently, such a mapping will result in the map key column being updated (although it shouldn't be). That fix will be covered by another issue. Once it is fixed, colums in a <composite-map-key> will no longer get nullified when removing a row from a @OneToMany collection. BackrefCompositeMapKeyTest is an example where this can happen (although it probably won't cause a test failure). |