I'm trying to have a constraint such that any node with the "Users" label has to have certain properties (like username, password, etc...)
When trying the CREATE CONSTRAINT ON (u:Users) ASSERT exists(u.username)
We get an error saying:
Unable to create CONSTRAINT ON ( users:Users ) ASSERT exists(users.username)
Neo.DatabaseError.Schema.ConstraintCreationFailure
This command was taken from the official 2.3.2 docs and the command was run from the browser interface.
So, what am I doing wrong? Also, is it recommended to store user sensitive information in neo4j?
Thanks.
Property exist constraints are part of the Enterprise edition of Neo4j and do not exist in Community edition. The documentation has a box stating this at http://neo4j.com/docs/stable/query-constraints.html.
I agree, very dissapointing. It is a basic feature that changes the behavior of the application and makes it impossible to move databases between editions. Exists() is not an enterprise feature, it is common function. Until this is fixed, Neo4j should let the user know in the server response when the constraint creation fails that this is an Enterprise feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With