Releases: mongodb/mongoid
9.0.5
Version 9.0.5 of the Mongoid ODM for MongoDB is now available.
Release Highlights
- MONGOID-5836 - Callbacks were being duplicated on deeply embedded children.
- MONGOID-5839 - When using single-collection inheritance, eager loading (with
#includes
) was not producing the correct query when the root of the query was the document subclass. - MONGOID-5825 - The
Mongoid::Timestamps
module would (in certain cases) attempt to timestamp deleted documents, which resulted in aFrozenError
being raised. - MONGOID-5822 - Perform validations on embedded documents even if the embedded documents have not changed.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 9.0.5 mongoid
Full Changelog: v9.0.4...v9.0.5
8.1.9
Version 8.1.9 of the Mongoid ODM for MongoDB is now available.
Release Highlights
- MONGOID-5836 - Callbacks were being duplicated on deeply embedded children.
- MONGOID-5839 - When using single-collection inheritance, eager loading (with
#includes
) was not producing the correct query when the root of the query was the document subclass. - MONGOID-5825 - The
Mongoid::Timestamps
module would (in certain cases) attempt to timestamp deleted documents, which resulted in aFrozenError
being raised. - MONGOID-5822 - Perform validations on embedded documents even if the embedded documents have not changed.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 8.1.9 mongoid
Full Changelog: v8.1.8...v8.1.9
8.0.9
Version 8.0.9 of the Mongoid ODM for MongoDB is now available.
Release Highlights
- MONGOID-5836 - Callbacks were being duplicated on deeply embedded children. A related issue (MONGOID-5542) was also backported to 8.0, exposing the
Mongoid.prevent_multiple_calls_of_embedded_callbacks
setting to preserve backwards compatibility in most cases (defaults tofalse
). - MONGOID-5757 - Child validations were being short-circuited, resulting in subsequent validation callbacks not being called after the first failing validation.
- MONGOID-5797 - Accessing the parent document from an embedded document was failing with an error when the original query applied a projection.
- MONGOID-5810 - When
Mongoid.legacy_attributes
istrue
, the#as_document
method was returning a hash that leaked internal model state. The hash is now deep-duplicated before being returned (which may have performance implications for large documents or complex hashes). - MONGOID-5839 - When using single-collection inheritance, eager loading (with
#includes
) was not producing the correct query when the root of the query was the document subclass. - MONGOID-5825 - The
Mongoid::Timestamps
module would (in certain cases) attempt to timestamp deleted documents, which resulted in aFrozenError
being raised.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 8.0.9 mongoid
Full Changelog: v8.0.8...v8.0.9
9.0.4
Version 9.0.4 of the Mongoid ODM for MongoDB is now available.
Release Highlights
There is one new feature in this release:
MONGOID-5829 adds
Mongoid.ignore_paths
, which specifies an array of glob patterns. Any file matching any of these patterns will not be automatically loaded during autoloading (e.g.Mongoid.load_models
). This fixes a problem encountered when non-model files (e.g. "concerns") are stored under the traditional model directories.
The following bug fixes are included in this release.
- MONGOID-5830 fixes a bug caused by an earlier optimization that forgot to account for the fact that the client name may be provided a as a
Proc
. - MONGOID-5831 fixes an incompatibility with Rails 8.0.1 and later due to the inadvertent use of an internal Rails API.
- MONGOID-5737 fixes an error that occurred when comparing a
Mongoid::Document
instance with an object that was not aMongoid::Document
instance. - MONGOID-5780 ensures that calling
not
multiple times (e.g.Model.where.not.not
) will toggle the criteria's negation state, rather than simply setting it totrue
. - MONGOID-5816 prevents
attr_readonly
from leaking into sibling classes, which was making it difficult to specify that certain attributes are only read-only in certain parts of an inheritance tree.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 9.0.4 mongoid
Full Changelog: v9.0.3...v9.0.4
8.1.8
Version 8.1.8 of the Mongoid ODM for MongoDB is now available.
Release Highlights
This is a patch release with the following bug fixes:
- MONGOID-5810 -- Internal model state was being leaked via
#as_document
, allowing the state to be unexpectedly mutated when the returned document was mutated. - MONGOID-5737 -- Comparing a model with a non-model was causing an error.
- MONGOID-5780 -- Chaining multiple
not
predicates together was not toggling the negation state (e.g.Model.where.not.not.not
) - MONGOID-5816 --
attr_readonly
was leaking into sibling classes, making it difficult to mark attributes read-only for only parts of an inheritance heirarchy.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 8.1.8 mongoid
What's Changed
- MONGOID-5810 Don't leak internal state via
#as_document
by @jamis in #5899 - MONGOID-5737 Fix issue where <=> errors if there's a non-document (backport for 8.1) by @DarshanaVenkatesh in #5917
- MONGOID-5780 Fix chaining nots resulting in incorrect negation state (backport for 8.1) by @DarshanaVenkatesh in #5915
- MONGOID-5816: attr_readonly leaks into sibling classes (backport for 8.1) by @DarshanaVenkatesh in #5920
- MONGOID-5831 Remove usage of Rails private API (#5908) by @comandeo-mongo in #5926
- Bump version to 8.1.8 by @comandeo-mongo in #5928
- try
bundle exec gem push
on rake release by @jamis in #5929 - Invalidate bundler cache when cutting a new gem by @jamis in #5930
- Deployment tweaks by @jamis in #5931
Full Changelog: v8.1.7...v8.1.8
9.0.3
Version 9.0.3 of the Mongoid ODM for MongoDB is now available.
Release Highlights
This patch release adds support for Ruby 3.3 and Rails 8 to Mongoid 9.0.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 9.0.3 mongoid
What's Changed
- MONGOID-5757 Fix validation checks so that all associated records are validated by @jamis in #5882
- MONGOID-5819 Do not pass the :database option when creating a client by @jamis in #5890
- MONGOID-5823 Use proper thread-local variables instead of fiber-local variables by @jamis in #5896
- MONGOID-5818 Support Rails 8 (#5876) by @comandeo-mongo in #5898
Full Changelog: v9.0.2...v9.0.3
8.1.7
Version 8.1.7 of the Mongoid ODM for MongoDB is now available.
Release Highlights
This patch release adds support for Ruby 3.3 and Rails 8 to Mongoid 8.1.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 8.1.7 mongoid
What's Changed
- MONGOID-5805 Short-circuit the logic in extract_attribute to fix performance regression by @jamis in #5869
- MONGOID-5757 Fix validation checks so that all associated records are validated by @jamis in #5883
- MONGOID-5818 Support Rails 8 by @comandeo-mongo in #5897
Full Changelog: v8.1.6...v8.1.7
9.0.2
Version 9.0.2 of the Mongoid ODM for MongoDB is now available.
Release Highlights
This patch release adds support for Rails 7.2. It also adds support for custom polymorphic types, and includes bug fixes.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 9.0.2 mongoid
What's Changed
- MONGOID-5734 Custom polymorphic types by @jamis in #5845
- MONGOID-5797 Fix accessing parent when projected by @comandeo-mongo in #5847
- MONGOID-5806 Rails 7.2 Support by @AlexKovynev in #5852
- MONGOID-5808 Fix collection_options in store_in by @comandeo-mongo in #5859
New Contributors
- @AlexKovynev made their first contribution in #5852
Full Changelog: v9.0.1...v9.0.2
8.1.6
Version 8.1.6 of the Mongoid ODM for MongoDB is now available.
Release Highlights
- MONGOID-5806: Rails 7.2 support.
- MONGOID-5769: Fix error with the
$pull
and$pop
operators not being handled correctly byupdateAll
. - MONGOID-5789: Fix behavior when requesting an attribute with
nil
as the name. Previously raised a spurious exception, now returns an empty string. - MONGOID-5797: When using a projection on a model with an
embeds_many
relation, accessing the inverse (parent) relation was failing. This has been fixed.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 8.1.6 mongoid
What's Changed
- DOCSP-37327: Fix table format (#5798) by @norareidy in #5800
- Mongoize is not called on update_all, when $set operator is used by @dem in #5815
- DOCSP-38361 - Add text to empty pages (#5826) by @jamis in #5827
- MONGOID-5789 Allow nil attribute access (backport of #5836) by @jamis in #5838
- MONGOID-5797 Fix accessing parent when projected (#5847) by @comandeo-mongo in #5849
- Fix mongoize update all array operators 8.1 by @JohnMaguir in #5824
- MONGOID-5806 Rails 7.2 Support (#5852) by @comandeo-mongo in #5860
- MONGOID-5793 Backport SSDLC changes from master by @jamis in #5865
- Prepare 8.1.6 release by @comandeo-mongo in #5864
- Prep for 8.1.6 by @jamis in #5867
Full Changelog: v8.1.5...v8.1.6
9.0.1
Version 9.0.1 of the Mongoid ODM for MongoDB is now available.
Release Highlights
- MONGOID-5786: In accordance with Ruby's enumerable API, the #sum method now accepts an optional block. Thank you to Cristián Pérez for your contributions!
- MONGOID-5688: Problematic recursive callstacks in cascading callbacks have been linearized using Ruby Fibers to prevent SystemStackErrors with greater numbers of embedded documents. Thank you to Adviti Mishra for your contributions!
- MONGOID-5769: $pop and $pull are now mongoized the same way as #addToSet or $push to ensure update_all functions as intended. Thank you to John Maguir and Michael Deryugin for your contributions!
- MONGOID-5789: querying an attribute with a nil name now returns an empty string, rather than raising an exception. Thank you to Dan Healy for your contribution!
- MONGOID-5785: if you set Mongoid.allow_scopes_to_unset_default_scope = true, you can invoke (e.g.) unscoped in a named scope to reset the current scope. This is useful for overriding default scopes inside of a named scope. This option will default to true in Mongoid 10.
- MONGOID-5791: If the parent document class is not loaded at the time of loading the embedded document class, a NameError used to be raised. This has been fixed.
- MONGOID-5796: The docs previously present in the Mongoid repository have been moved to the docs-mongoid repository.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 9.0.1 mongoid
What's Changed
- Mongoize is not called on update_all, when $set operator is used by @dem in #5814
- Fix mongoize update all array operators master by @JohnMaguir in #5823
- DOCSP-38361 - Add text to empty pages by @mongoKart in #5826
- MONGOID-5508 touch on custom field by @adviti-mishra in #5829
- RUBY-3489: Add empty SBOM lite file by @alcaeus in #5830
- MONGOID-5786: Fix some compatibility issues with Enumerable API by @cperezabo in #5831
- MONGOID-5785 allow named scopes to remove a default scope by @jamis in #5832
- MONGOID-5743 SSDLC Requirements by @jamis in #5834
- MONGOID-5789 database_field_name given nil or empty string should raise UnknownAttribute exception by @danhealy in #5836
- DOP-4809: Remove docs/ since it has been migrated to mongodb/docs-mongoid by @i80and in #5840
- MONGOID-5790 MONGOID-5791 Fix error caused by loading a referenced class prematurely by @jamis in #5839
- Modified the comment to rightly indicate the error being raised is In… by @adviti-mishra in #5841
- 5688: Run callbacks for children within fibers by @adviti-mishra in #5837
- Added a pointer to docs-mongoid in the README.md by @adviti-mishra in #5843
New Contributors
- @mongoKart made their first contribution in #5826
- @adviti-mishra made their first contribution in #5829
- @cperezabo made their first contribution in #5831
- @danhealy made their first contribution in #5836
- @i80and made their first contribution in #5840
Full Changelog: v9.0.0...v9.0.1