{"record":{"id":"27981ccfeb1d9fb4","repo":"mongodb/mongoid","slug":"notimplementederror","errorCode":null,"errorMessage":"NotImplementedError","messagePattern":"NotImplementedError","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"lib/mongoid/association/eager.rb","lineNumber":69,"sourceCode":"        end\n\n        while shift_association\n          preload\n          @loaded << @docs.collect { |d| d.send(@association.name) if d.respond_to?(@association.name) }\n        end\n        @loaded.flatten\n      end\n\n      protected\n\n      # Preload the current association.\n      #\n      # This method should be implemented in the subclass\n      #\n      # @example Preload the current association into the documents.\n      #   loader.preload\n      def preload\n        raise NotImplementedError\n      end\n\n      # Preload the current association using $lookup aggregation.\n      # This method executes the aggregation pipeline\n      # and instantiates the documents.\n      # @example Preload the current association using $lookup.\n      #   loader.preload_with_lookup\n      def preload_with_lookup\n        # For $lookup aggregation, execute pipeline and instantiate documents\n        owner_class = @associations.first.owner_class\n        aggregated_docs = owner_class.collection.aggregate(@pipeline)\n        aggregated_docs.each do |doc|\n          parsed_doc = Factory.from_db(owner_class, doc)\n          @docs << parsed_doc\n        end\n      end\n\n      # Retrieves the documents referenced by the association, and","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/mongodb/mongoid/blob/0da0e23d71adfbad31128c18e5e2c8c301c6f7c4/lib/mongoid/association/eager.rb#L51-L87","documentation":"Error \"NotImplementedError\" thrown in mongodb/mongoid.","triggerScenarios":"Thrown at lib/mongoid/association/eager.rb:69 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"}