// 5. referential integrity
if ((options & CHECK_REFERENCES) == CHECK_REFERENCES) {
EffectiveNodeType ent = getEffectiveNodeType(targetState);
if (ent.includesNodeType(NameConstants.MIX_REFERENCEABLE)) {
NodeReferencesId refsId = new NodeReferencesId(targetState.getNodeId());
if (stateMgr.hasNodeReferences(refsId)) {
try {
NodeReferences refs = stateMgr.getNodeReferences(refsId);
if (refs.hasReferences()) {
throw new ReferentialIntegrityException(safeGetJCRPath(targetPath)