我需要得到朋友的朋友" User
。所以,friend(rel_length: 2)
不起作用(忽略方法),回归朋友。
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
答案 0 :(得分:0)
对于后来发现这个的人来说,原因是因为他使用的是旧版本的宝石(见评论)