Skip to content

Commit

Permalink
Fix broken test as well
Browse files Browse the repository at this point in the history
  • Loading branch information
gem-neo4j committed Dec 18, 2024
1 parent 4f3ae7d commit e408d2a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions core/src/main/java/apoc/schema/Schemas.java
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,20 @@ private IndexConstraintNodeInfo nodeInfoFromConstraintDefinition(
0,
0,
0,
ktx.schemaRead()
.constraintGetForName(constraintDefinition.getName())
.userDescription(tokens));
nodeConstraintCypher5Compatibility(
ktx.schemaRead()
.constraintGetForName(constraintDefinition.getName())
.userDescription(tokens),
useStoredName));
}

private String nodeConstraintCypher5Compatibility(String userDescription, Boolean useStoredName) {
if (useStoredName) {
return userDescription;
} else {
// Revert to old description on Cypher 5 for backwards compatibility.
return userDescription.replace("'NODE PROPERTY UNIQUENESS'", "'UNIQUENESS'");
}
}

/**
Expand Down

0 comments on commit e408d2a

Please sign in to comment.