Method “rel_length” in Neo4j.rb doesn't work.

筅森魡賤 提交于 2019-12-11 11:15:13

问题


I need to get "friends of friends" of User. So, friend(rel_length: 2) doesn't work (ignores method), returning friends.

class User
  include Neo4j::ActiveNode
  ...
  has_many :out, :friend, rel_class: Friend
  ...
end

class Friend
  include Neo4j::ActiveRel
  from_class User
  to_class User
  type 'friend'

  property :activity, type: String
  property :relation, type: String
  property :token, type: String
end

回答1:


For anybody finding this later the reason was because he was using an older version of the gem (see the comments)



来源:https://stackoverflow.com/questions/35192885/method-rel-length-in-neo4j-rb-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!