Releases: mongodb/mongoid
7.4.0
Mongoid 7.4.0 is a feature release fully compatible with 7.3. All behavior changes described below are optional and must be opted-into by toggling the respective configuration options.
Mongoid 7.4 formally supports Ruby 3.1.
Mongoid 7.4 formally supports MongoDB server 5.0 and deprecates support for servers 3.4 and earlier. Mongoid 8 will require server 3.6 or newer.
For a more thorough description of the new functionality, and the options needed to enable it, please review the release notes.
The following major improvements are available in 7.4.0:
- MONGOID-5128 Scoped associations - Add :scope parameter to associations
- MONGOID-5028 demongoize custom fields on pluck
- MONGOID-5162 Remove BSON::ObjectId#as_json override
- MONGOID-5195 _matches? can limit to millisecond precision when comparing Time objects
- MONGOID-5005 .sum and similar aggregables ignore sort if not limiting/skipping
- MONGOID-5186 .with_scope restores previous scope
- MONGOID-5260 Add _translations fields and dot-navigation to pluck and distinct
- MONGOID-5105 Allow block form in Mongoid::Association::EmbedsMany::Proxy#count
- MONGOID-5126 Bring Mongoid::Document's === implementation in alignment with Ruby behavior
- MONGOID-5151 Respect aliased fields in pluck/distinct by having Document.database_field_name recursively consider embedded docs
- MONGOID-5103 Implement eq symbol operator
The following bugs were fixed and, where previously the functionality worked in a different way rather than was completely unusable, must also be explicitly requested via the respective options:
- MONGOID-5240 embeds_many does not get reset after clear
- MONGOID-5198 Calling children_changed? on a deep cyclical data structure will cause semi-infinite looping
- MONGOID-5206 Reloading retains stale changed value
- MONGOID-5183 Existing
$and
clause in query is overwritten bywhere
condition - MONGOID-5199 Reloadable#reload_embedded_document doesn't respect session
- MONGOID-4755 Mongoid::Contextual::Aggregable::Mongo#sum does not return nil as expected for Mongoid::Document#none
- MONGOID-5194 has_and_belongs_to_many custom primary key gets ignored when building a document or adding multiple documents
- MONGOID-5204 default_scopes duplication, query scope inconsistency
- MONGOID-5208 Error when reloading with a nil embedded field
- MONGOID-5219 Uniqueness validation for StringifiedSymbol field in an embedded document fails
7.3.4
This patch release in the 7.3 series adds compatibility with Rails 7.
The following bug was fixed:
7.3.3
This patch release in the 7.3 series adds the following improvements:
- MONGOID-5029 Implement association
empty?
viaany?
instead ofcount
- MONGOID-5140 Atomic #unset method should allow Hash args (in addition to current String/Symbol/Array)
- MONGOID-5099 Provide a better error message when loading an empty configuration file
- MONGOID-5144 Add deprecation warning when the legacy Mongoid query cache is used
- MONGOID-4737 Deprecate Document#as_json :compact option
- MONGOID-5147 Add missing find_first & one methods to Mongoid::Contextual::None
The following issues have been fixed:
7.2.6
This patch release in the 7.2 series adds the following improvements:
- MONGOID-5140 Atomic #unset method should allow Hash args (in addition to current String/Symbol/Array)
- MONGOID-5099 Provide a better error message when loading an empty configuration file
- MONGOID-5144 Add deprecation warning when the legacy Mongoid query cache is used
- MONGOID-4737 Deprecate Document#as_json :compact option
- MONGOID-5147 Add missing find_first & one methods to Mongoid::Contextual::None
The following issue has been fixed:
7.1.11
This patch release in the 7.1 series adds the following improvements:
- MONGOID-5140 Atomic #unset method should allow Hash args (in addition to current String/Symbol/Array)
- MONGOID-5147 Add missing find_first & one methods to Mongoid::Contextual::None
- MONGOID-5099 Provide a better error message when loading an empty configuration file
- MONGOID-4737 Deprecate Document#as_json :compact option
7.3.2
This patch release in the 7.3 series fixes the following bug:
- MONGOID-5123 Association proxies
method_missing
does not handle keyword args
7.2.5
This patch release in the 7.2 series fixes the following bug:
- MONGOID-5123 Association proxies
method_missing
does not handle keyword args
7.1.10
This patch release in the 7.1 series fixes the following bug:
- MONGOID-5123 Association proxies
method_missing
does not handle keyword args
7.3.1
This patch release in the 7.3 series adds compatibility with Ruby 3.
The following bug was fixed: