Class: Mongoid::Association::EagerLoad::DeferredInclusion Private
- Inherits:
-
AssociationInclusion
- Object
- Inclusion
- AssociationInclusion
- Mongoid::Association::EagerLoad::DeferredInclusion
- Defined in:
- lib/mongoid/association/eager_load/inclusion.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A polymorphic inclusion: its target collection varies per document, so it can't be a $lookup. It adds nothing here; PolymorphicPreloader resolves it after the roots are materialized.
Instance Attribute Summary
Attributes inherited from AssociationInclusion
Class Method Summary collapse
-
.for?(association) ⇒ true | false
private
Whether the association is polymorphic.
Instance Method Summary collapse
-
#contribute(destination, chain) ⇒ Object
private
Add nothing; PolymorphicPreloader resolves the association after the roots are materialized.
Methods inherited from AssociationInclusion
Constructor Details
This class inherits a constructor from Mongoid::Association::EagerLoad::AssociationInclusion
Class Method Details
.for?(association) ⇒ true | false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns Whether the association is polymorphic.
159 160 161 |
# File 'lib/mongoid/association/eager_load/inclusion.rb', line 159 def for?(association) association.polymorphic? end |
Instance Method Details
#contribute(destination, chain) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Add nothing; PolymorphicPreloader resolves the association after the roots are materialized.
169 |
# File 'lib/mongoid/association/eager_load/inclusion.rb', line 169 def contribute(destination, chain); end |