super( string );
}
public void testDeleteParentButNotChild() {
CollectionListeners listeners = new CollectionListeners( getSessions() );
ParentWithCollection parent = createParentWithOneChild( "parent", "child" );
ChildEntity child = ( ChildEntity ) parent.getChildren().iterator().next();
listeners.clear();
Session s = openSession();
Transaction tx = s.beginTransaction();
parent = ( ParentWithCollection ) s.get( parent.getClass(), parent.getId() );
child = ( ChildEntity ) s.get( child.getClass(), child.getId() );
parent.removeChild( child );
s.delete( parent );
tx.commit();
s.close();
int index = 0;
checkResult( listeners, listeners.getInitializeCollectionListener(), parent, index++ );