diff --git a/modules/apps/object/object-service/src/main/java/com/liferay/object/service/impl/ObjectRelationshipLocalServiceImpl.java b/modules/apps/object/object-service/src/main/java/com/liferay/object/service/impl/ObjectRelationshipLocalServiceImpl.java index 29d5778b84fe8e..c655b6671a5627 100644 --- a/modules/apps/object/object-service/src/main/java/com/liferay/object/service/impl/ObjectRelationshipLocalServiceImpl.java +++ b/modules/apps/object/object-service/src/main/java/com/liferay/object/service/impl/ObjectRelationshipLocalServiceImpl.java @@ -1497,23 +1497,6 @@ private void _validateEdge( "an edge of a root context"); } - int objectDefinition1ObjectEntriesCount = - _objectEntryLocalService.getObjectEntriesCount( - objectRelationship.getObjectDefinitionId1()); - int objectDefinition2ObjectEntriesCount = - _objectEntryLocalService.getObjectEntriesCount( - objectRelationship.getObjectDefinitionId2()); - - if ((objectDefinition1ObjectEntriesCount > 0) || - (objectDefinition2ObjectEntriesCount > 0)) { - - throw new ObjectRelationshipEdgeException( - StringBundler.concat( - "Object relationship must not be between object ", - "definitions that contains object entries to be an edge ", - "of a root context")); - } - ObjectDefinitionLocalService objectDefinitionLocalService = _objectDefinitionLocalServiceSnapshot.get();