如何通过与neo4j和rails的关联实现多对多

时间:2019-03-29 09:36:19

标签: ruby-on-rails neo4j graph-databases

我想要两个模型之间的多对多关联。正常的Rails关联示例如下:

class A < ApplicationRecord
  has_many :abs
  has_many :bs, through: :abs
end

class B < ApplicationRecord
  has_many :abs
  has_many :as, through: :abs
end

class AB < ApplicationRecord
  belongs_to :a
  belongs_to :b
end

neo4j如何处理?

0 个答案:

没有答案