mongodb/mongoid · error · NotImplementedError
NotImplementedError
Error message
NotImplementedError
What it means
Error "NotImplementedError" thrown in mongodb/mongoid.
Source
Thrown at lib/mongoid/association/eager_load/inclusion.rb:21
module Mongoid
module Association
module EagerLoad
# Something an eager load contributes to the pipeline, in the role it plays
# while the pipeline is built. A root is asked to contribute and the whole
# tree follows by recursion. AssociationInclusion stands for a single
# association; DiscriminatedInclusion stands for a name several subclasses
# share.
#
# @api private
class Inclusion
# Add this inclusion's stages to the destination.
#
# @param [ Array<Hash> ] destination The pipeline (or sub-pipeline) the
# stages are appended to.
# @param [ Array<Mongoid::Association::Relatable> ] chain The embedded path
# accumulated from the ancestors above this inclusion (empty at the top).
def contribute(destination, chain)
raise NotImplementedError
end
end
# An inclusion that stands for a single association. The LookupPipeline holds
# the stage-building helpers the kinds lean on, and a node carries its own
# children, so the pipeline is built by recursion from the roots downward.
#
# @api private
class AssociationInclusion < Inclusion
class << self
# Builds the right kind of inclusion for the association. Each subclass
# decides whether it handles it (.for?); exactly one does.
#
# @param [ Mongoid::Association::Relatable ] association The inclusion.
# @param [ LookupPipeline ] pipeline The pipeline being built.
# @param [ Array<Inclusion> ] children The inclusions nested under it.
#
# @return [ AssociationInclusion ] The matching kind of inclusion.View on GitHub (pinned to 0da0e23d71)
When it happens
Trigger: Thrown at lib/mongoid/association/eager_load/inclusion.rb:21 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of mongodb/mongoid@0da0e23d71 (2026-08-23).
Data as JSON: /api/errors/34799ac66078e3b3.
Report an issue: GitHub.