假设我们的应用程序中有以下模型:
# AR model
class Foo < ActiveRecord::Base
belongs_to :bars # this is an association pointing to a Mongoid model
end
# Mongoid model
class Bar
include Mongoid::Document
belongs_to :foo # this is an association pointing to a AR model
end
是否可以在指向 AR 模型的 Mongoid 模型中创建关联,反之亦然?