// otherwise, delete the reference objects one by one
if (this.hasCustomDeleteAllQuery()) {
this.deleteAll(query, referenceObjects);
} else {
ContainerPolicy cp = this.getContainerPolicy();
for (Object iter = cp.iteratorFor(referenceObjects); cp.hasNext(iter);) {
DeleteObjectQuery deleteQuery = new DeleteObjectQuery();
deleteQuery.setIsExecutionClone(true);
deleteQuery.setObject(cp.next(iter, query.getSession()));
deleteQuery.setCascadePolicy(query.getCascadePolicy());
query.getSession().executeQuery(deleteQuery);