Skip to content

Commit 5ecd6f7

Browse files
AzuObsjohnlinp
andauthored
[NOID] Fix the missing constraint error message for apoc.import.json() (#304)
Fixes #290 Signed-off-by: John Lin <johnlinp@gmail.com> Co-authored-by: John Lin <johnlinp@gmail.com>
1 parent 0f0f3ed commit 5ecd6f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/apoc/export/json/JsonImporter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class JsonImporter implements Closeable {
4040
"MATCH (e%s {%2$s: row.end.id}) " +
4141
"CREATE (s)-[r:%s]->(e) SET r += row.properties";
4242
public static final String MISSING_CONSTRAINT_ERROR_MSG = "Missing constraint required for import. Execute this query: \n" +
43-
"CREATE CONSTRAINT ON (n:%s) assert n.%s IS UNIQUE;";
43+
"CREATE CONSTRAINT FOR (n:%s) REQUIRE n.%s IS UNIQUE;";
4444

4545
private final List<Map<String, Object>> paramList;
4646
private final int unwindBatchSize;

0 commit comments

Comments
 (0)