if you have bi-directional relation with inverse="true" and cascade="all-delete-orphan", the way to delete either shape or point is as follows.
Code:
Shape shape = session.get( Shape.class, shapeId );
// if you want to delete few points of a shape
Point myDeletePoint = getPoint();
if ( shape.getPointsCollection().contains( myDeletePoint ) ) {
shape.getPointsCollection().remove( myDeletePoint );
myDeletePoint.setShape( null );
}
// this will delete only point and removes the reference from shape collection
session.saveOrUpdate( shape );
//--------------------
// if you want to delete Shape itself
// when cascade is enabled, all points will also be deleted
Shape shape = session.get( Shape.class, shapeId );
session.delete( shape );