{"record":{"id":"34799ac66078e3b3","repo":"mongodb/mongoid","slug":"notimplementederror-34799a","errorCode":null,"errorMessage":"NotImplementedError","messagePattern":"NotImplementedError","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"lib/mongoid/association/eager_load/inclusion.rb","lineNumber":21,"sourceCode":"module Mongoid\n  module Association\n    module EagerLoad\n      # Something an eager load contributes to the pipeline, in the role it plays\n      # while the pipeline is built. A root is asked to contribute and the whole\n      # tree follows by recursion. AssociationInclusion stands for a single\n      # association; DiscriminatedInclusion stands for a name several subclasses\n      # share.\n      #\n      # @api private\n      class Inclusion\n        # Add this inclusion's stages to the destination.\n        #\n        # @param [ Array<Hash> ] destination The pipeline (or sub-pipeline) the\n        #   stages are appended to.\n        # @param [ Array<Mongoid::Association::Relatable> ] chain The embedded path\n        #   accumulated from the ancestors above this inclusion (empty at the top).\n        def contribute(destination, chain)\n          raise NotImplementedError\n        end\n      end\n\n      # An inclusion that stands for a single association. The LookupPipeline holds\n      # the stage-building helpers the kinds lean on, and a node carries its own\n      # children, so the pipeline is built by recursion from the roots downward.\n      #\n      # @api private\n      class AssociationInclusion < Inclusion\n        class << self\n          # Builds the right kind of inclusion for the association. Each subclass\n          # decides whether it handles it (.for?); exactly one does.\n          #\n          # @param [ Mongoid::Association::Relatable ] association The inclusion.\n          # @param [ LookupPipeline ] pipeline The pipeline being built.\n          # @param [ Array<Inclusion> ] children The inclusions nested under it.\n          #\n          # @return [ AssociationInclusion ] The matching kind of inclusion.","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/mongodb/mongoid/blob/0da0e23d71adfbad31128c18e5e2c8c301c6f7c4/lib/mongoid/association/eager_load/inclusion.rb#L3-L39","documentation":"Error \"NotImplementedError\" thrown in mongodb/mongoid.","triggerScenarios":"Thrown at lib/mongoid/association/eager_load/inclusion.rb:21 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0da0e23d71adfbad31128c18e5e2c8c301c6f7c4","analyzedAt":"2026-08-23T06:25:47.656Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}