Iterator it = metadata.iterator();
while (it.hasNext()) {
ObjMetadata objMetadata = (ObjMetadata) it.next();
ObjMetacontent objMetacontent = (ObjMetacontent) DAOFactory.getObjMetacontentDAO().loadObjMetacontent(objMetadata.getObjMetaId(), hibSubobject.getSbiObject().getBiobjId(), hibSubobject.getSubObjId());
if(objMetacontent!=null){
objMetaContentDAO.eraseObjMetadata(objMetacontent);
}
}
}
aSession.delete(hibSubobject);