Skip to content

Commit

Permalink
Merge pull request #3298 from atlanhq/PLT-1764-reference-query
Browse files Browse the repository at this point in the history
feat: updated the method by which we were verifying reference
  • Loading branch information
sumandas0 authored Jul 2, 2024
2 parents 4869598 + 5b93d0c commit b279e9a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,12 @@ public static List<String> getPropagatedVerticesIds (AtlasVertex classificationV
}

public static boolean hasEntityReferences(AtlasVertex classificationVertex) {
return classificationVertex.hasEdges(AtlasEdgeDirection.IN, CLASSIFICATION_LABEL);
boolean ret = false;
Iterator edgeIterator = classificationVertex.query().direction(AtlasEdgeDirection.IN).label(CLASSIFICATION_LABEL).edges(1).iterator();
if (edgeIterator != null && edgeIterator.hasNext()) {
ret = true;
}
return ret;
}

public static List<AtlasVertex> getAllPropagatedEntityVertices(AtlasVertex classificationVertex) {
Expand Down

0 comments on commit b279e9a

Please sign in to comment.