Closed Ravineesh closed 2 years ago
This issue is resolved now.!
how you solve this error can you help me plss!
This error occurs when two nodes already exist with the same property, meaning the constraint is already violated and can't be created.
If you delete one of the users with that email address, you should be able to create the constraint.
MATCH (u:User)
WITH u.email AS email, collect(u) AS users
WHERE size(users) > 1
FOREACH (u IN tail(users) | DETACH DELETE u)
This error occurs when two nodes already exist with the same property, meaning the constraint is already violated and can't be created.
If you delete one of the users with that email address, you should be able to create the constraint.
MATCH (u:User) WITH u.email AS email, collect(u) AS users WHERE size(users) > 1 FOREACH (u IN tail(users) | DETACH DELETE u)
thanks a lot but still this application has lot of error after completing all the challenges.
Did this query solve this issue for you? Can you please open a new issue with the details of the other errors?
I've been trying to pass the test case for Challenge: Unique email addresses, but the test case is failing:
To complete the task, one should insert the constraints in the Neo4j sandbox but running the constraint in the sandbox is giving me the below error. Before applying this constraint there are a few nodes, which already share the same email address, as result the constraint is failing.