Details
-
New Feature
-
Status: Backlog
-
Major - P3
-
Resolution: Unresolved
-
7.1.5
-
None
-
Ruby 2.5.8, Rails 6.0.3.5
Description
Given the models
class Family |
include Mongoid::Document
|
|
embeds_many :children |
end
|
|
class Child |
include Mongoid::Document
|
|
embedded_in :family |
|
belongs_to :school |
end
|
|
class School |
include Mongoid::Document
|
end |
I assumed it would be possible to eagerly load the schools of all children in all families, but it threw an exception:
2.5.8 :004 > Family.all.includes(children: :school).each { |f| p f } |
Traceback (most recent call last):
|
1: from (irb):4 |
NoMethodError (undefined method `eager_loader' for Mongoid::Association::Embedded::EmbedsMany::Proxy:Class) |