neo4j.rb

Neo4j.rb WARNING: The constraint option is no longer supported?


How to fix this warning (WARNING: The constraint option is no longer supported (Defined on StayPal for user_id) I am using Neo4j.rb > 8 neo4j > 3 Following

http://neo4jrb.readthedocs.io/en/8.0.x/ActiveNode.html

using property :user_id, constraint: :unique

How to add uniqness?


Solution

  • Defining constraints on models for auto-creation isn’t supported as of 8.0 of the neo4j gem. See this section of the upgrade guide: http://neo4jrb.readthedocs.io/en/8.0.x/UpgradeGuide.html#indexes-and-constraints