-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 7.1.5
-
Component/s: Query
-
Environment:Ruby 2.5.8, Rails 6.0.3.5
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)