Neo4j.rb create unique relationship
问题 Here is my Neo4j Active Node class User include Neo4j::ActiveNode has_many :out, :following, type: :following, model_class: 'User' end john = User.find(:name => "John") tom = User.find(:name => "Tom") # create following relationship john --> tom john.following << tom # check count john.following.count #=> 1 # again create the relationship john.following << tom # again check count john.following.count #=> 2 I want to create unique relationship. To avoid duplication we have to use create unique