When you use a bag, Hibernate has no way to uniquely identify each row, thus it cannot efficiently perform single row operations.
The term on-shot-delete actually refers to the opposite of what you quote from the docs. A one-shot-delete operation is deleteing all elements in a collection and then re-inserting them.
One-shot-delete is available for all Collection types. To apply a one-shot-delete, do something likes this:
Code:
Parent parent = session.load( Parent.class, parentId );
List children = new ArrayList();
children.add( child1 );
children.add( child2 );
parent.setChildren( children );
Or if you map using a list or set and want to avoid using one-shot-delete semantics, then do something like:
Code:
Parent parent = session.load( Parent.class, parentId );
parent.getChildren().add( child1 );
parent.getChildren().remove( child2 );
[/code]