-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 7.5.0
-
Component/s: None
-
None
This appears to be a regression from MONGOID-4998 as it only affects Mongoid 7.5+, but works with Mongoid <= 7.4:
# replace with '7.5' to validate failure VERSION_TO_TEST = '7.4' require 'bundler/inline' gemfile do source 'https://rubygems.org' gem 'mongoid', VERSION_TO_TEST end Mongoid.configure.clients.default = { uri: "mongodb+srv://..." } class Test include Mongoid::Document field :name def self.go! t = self.create(name: "hello") # the {} parameter make the code crash on 7.5, not on 7.4 puts "Testing with #{Mongoid::VERSION}" puts Test.where(name: "hello").first({}) end end Test.go! # => KeyError: key not found: :id_sort
- related to
-
MONGOID-4998 Make all #first and #last methods have consistent signatures and compatible with Ruby core/AR
- Closed