use of org.hibernate.action.internal.EntityActionVetoException in project hibernate-orm by hibernate.
the class ActionQueue method addResolvedEntityInsertAction.
private void addResolvedEntityInsertAction(AbstractEntityInsertAction insert) {
if (insert.isEarlyInsert()) {
LOG.trace("Executing insertions before resolved early-insert");
executeInserts();
LOG.debug("Executing identity-insert immediately");
execute(insert);
} else {
LOG.trace("Adding resolved non-early insert action.");
addAction(AbstractEntityInsertAction.class, insert);
}
if (!insert.isVeto()) {
insert.makeEntityManaged();
if (unresolvedInsertions != null) {
for (AbstractEntityInsertAction resolvedAction : unresolvedInsertions.resolveDependentActions(insert.getInstance(), session)) {
addResolvedEntityInsertAction(resolvedAction);
}
}
} else {
throw new EntityActionVetoException("The EntityInsertAction was vetoed.", insert);
}
}
Aggregations