Recent Releases of https://github.com/mongodb/mongoid
https://github.com/mongodb/mongoid - 9.0.10
The MongoDB Ruby team is pleased to announce version 9.0.10 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 9.0.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 9.0.10 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '9.0.10'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
- MONGOID-5864 Include Rails framework version in client metadata on initial handshake (PR)
Bug Fixes
- MONGOID-5899 Write conflict error when accessing embedded documents via [] operator after direct DB update (PR)
- MONGOID-5919 Restrict Criteria.from_hash method (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 month ago
https://github.com/mongodb/mongoid - 8.1.12
The MongoDB Ruby team is pleased to announce version 8.1.12 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 8.1.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 8.1.12 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '8.1.12'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
- MONGOID-4889 Optimize batch assignment of embedded documents (backport to 8.1) (PR)
- MONGOID-5864 Include Rails framework version in client metadata on initial handshake (PR)
Bug Fixes
- MONGOID-5833 Fix Document#touch (PR)
- MONGOID-5919 Restrict to_criteria (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 month ago
https://github.com/mongodb/mongoid - 8.0.12
The MongoDB Ruby team is pleased to announce version 8.0.12 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 8.0.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 8.0.12 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '8.0.12'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
- MONGOID-5864 Include Rails framework version in client metadata on initial handshake (PR)
Bug Fixes
- MONGOID-5919 Restrict to_criteria (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 month ago
https://github.com/mongodb/mongoid - 7.6.1
The MongoDB Ruby team is pleased to announce version 7.6.1 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 7.6.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 7.6.1 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '7.6.1'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
- MONGOID-5864 Include Rails framework version in client metadata on initial handshake (PR)
Bug Fixes
- MONGOID-5919 Restrict to_criteria (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 month ago
https://github.com/mongodb/mongoid - 9.0.9
The MongoDB Ruby team is pleased to announce version 9.0.9 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 9.0.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 9.0.9 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '9.0.9'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
- MONGOID-5890 Handle BSON::Decimal128 specially when checking for changes (PR)
- Rails 8.1 Support (PR)
- MONGOID-5900 Fix #pluck on associations (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] 2 months ago
https://github.com/mongodb/mongoid - 7.6.0
The MongoDB Ruby team is pleased to announce version 7.6.0 of the mongoid gem - a Ruby ODM for MongoDB. This is a new minor release in the 7.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 7.6.0 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '7.6.0'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
New Features
- 7.6.0 is now officially compatible with the actual version of the Mongo Ruby Driver (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] 3 months ago
https://github.com/mongodb/mongoid - 9.0.8
The MongoDB Ruby team is pleased to announce version 9.0.8 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 9.0.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 9.0.8 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '9.0.8'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
- MONGOID-5852 Fix after_action_commit callbacks (PR)
- MONGOID-4889 Optimize batch assignment of embedded documents (PR)
- MONGOID-5888 Ensure deeply nested children are validated correctly (PR)
- MONGOID-5885 Return value from transaction yield to caller instead of internal state (PR)
- MONGOID-5895 Make Reload Properly Update new_record (PR)
- MONGOID-5887 Include server hint for aggregate operations (PR)
- MONGOID-5869 Fix incorrectly named global_executor_concurrency config in code comment (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] 6 months ago
https://github.com/mongodb/mongoid - 8.0.11
The MongoDB Ruby team is pleased to announce version 8.0.11 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 8.0.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 8.0.11 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '8.0.11'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
MONGOID-5848 Revert MONGOID-5822 (PR)
MONGOID-5822 attempted to fix a regression where child callbacks that depended on parent state were no longer invoked if the child had not changed. However, the fix itself introduced an unacceptable performance regression.
This PR restores the earlier functionality, which will break apps that depend on callbacks being invoked on unmodified children.
For now, the correct way to implement that behavior is to explicitly iterate over the children in a parent callback, e.g.:
class Parent
include Mongoid::Document
has_many :children
after_save { children.each(&:parent_changed_callback) }
end
class Child
include Mongoid::Document
belongs_to :parent
def parent_changed_callback
# ...
end
end
Other Bug Fixes
- MONGOID-5843 Ensure BSON::Decimal128 is considered to be numeric (PR)
- MONGOID-5874 Fix persisting embedded children (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] 7 months ago
https://github.com/mongodb/mongoid - 8.1.11
The MongoDB Ruby team is pleased to announce version 8.1.11 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 8.1.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 8.1.11 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '8.1.11'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
MONGOID-5848 Revert MONGOID-5822 (PR)
MONGOID-5822 attempted to fix a regression where child callbacks that depended on parent state were no longer invoked if the child had not changed. However, the fix itself introduced an unacceptable performance regression.
This PR restores the earlier functionality, which will break apps that depend on callbacks being invoked on unmodified children.
For now, the correct way to implement that behavior is to explicitly iterate over the children in a parent callback, e.g.:
class Parent
include Mongoid::Document
has_many :children
after_save { children.each(&:parent_changed_callback) }
end
class Child
include Mongoid::Document
belongs_to :parent
def parent_changed_callback
# ...
end
end
Other Bug Fixes
- MONGOID-5874 Fix persisting embedded children (PR)
- MONGOID-5863 last overrides skip (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] 7 months ago
https://github.com/mongodb/mongoid - 9.0.7
The MongoDB Ruby team is pleased to announce version 9.0.7 of the mongoid gem - a Ruby ODM for MongoDB. This is a new patch release in the 9.0.x series of Mongoid.
Install this release using RubyGems via the command line as follows:
gem install -v 9.0.7 mongoid
Or simply add it to your Gemfile:
gem 'mongoid', '9.0.7'
Have any feedback? Click on through to MongoDB's JIRA and open a new ticket to let us know what's on your mind 🧠.
Bug Fixes
MONGOID-5848 Revert MONGOID-5822 (PR)
MONGOID-5822 attempted to fix a regression where child callbacks that depended on parent state were no longer invoked if the child had not changed. However, the fix itself introduced an unacceptable performance regression.
This PR restores the earlier functionality, which will break apps that depend on callbacks being invoked on unmodified children (for example, when a child callback depends simply on the parent having changed state).
For now, the correct way to implement that behavior is to explicitly iterate over the children in a parent callback, e.g.:
class Parent
include Mongoid::Document
has_many :children
after_save { children.each(&:parent_changed_callback) }
end
class Child
include Mongoid::Document
belongs_to :parent
def parent_changed_callback
# ...
end
end
Other Bug Fixes
- MONGOID-5843 Ensure BSON::Decimal128 is considered to be numeric (PR)
- MONGOID-5874 Fix persisting embedded children (PR)
- MONGOID-5863 last overrides skip (PR)
- Ruby
Published by mongodb-dbx-release-bot[bot] 7 months ago
https://github.com/mongodb/mongoid - 8.0.10
Version 8.0.10 of the Mongoid ODM for MongoDB is now available.
Release Highlights
Mongoid 8.0.10 is a patch release that includes the following bug fix:
- MONGOID-5844: querying the number of elements in a
has_and_belongs_to_manyassociation could return the wrong count in specific situations.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 8.0.10 mongoid
Full Changelog: https://github.com/mongodb/mongoid/compare/v8.0.9...v8.0.10
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/mongodb/mongoid - 8.1.10
Version 8.1.10 of the Mongoid ODM for MongoDB is now available.
Release Highlights
Mongoid 8.1.10 is a patch release that includes the following bug fix:
- MONGOID-5844: querying the number of elements in a
has_and_belongs_to_manyassociation could return the wrong count in specific situations.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 8.1.10 mongoid
Full Changelog: https://github.com/mongodb/mongoid/compare/v8.1.9...v8.1.10
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/mongodb/mongoid - 9.0.6
Version 9.0.6 of the Mongoid ODM for MongoDB is now available.
Release Highlights
This is a patch release that includes the following bug fix:
- MONGOID-5844: querying the number of elements in a
has_and_belongs_to_manyassociation could return the wrong count in specific situations.
Documentation
Documentation is available at MongoDB.com.
Installation
You may install this version via RubyGems, with:
gem install --version 9.0.6 mongoid
Full Changelog: https://github.com/mongodb/mongoid/compare/v9.0.5...v9.0.6
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/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::Timestampsmodule would (in certain cases) attempt to timestamp deleted documents, which resulted in aFrozenErrorbeing 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: https://github.com/mongodb/mongoid/compare/v9.0.4...v9.0.5
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/mongodb/mongoid - 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::Timestampsmodule would (in certain cases) attempt to timestamp deleted documents, which resulted in aFrozenErrorbeing 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: https://github.com/mongodb/mongoid/compare/v8.1.8...v8.1.9
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/mongodb/mongoid - 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_callbackssetting 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_attributesistrue, the#as_documentmethod 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::Timestampsmodule would (in certain cases) attempt to timestamp deleted documents, which resulted in aFrozenErrorbeing 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: https://github.com/mongodb/mongoid/compare/v8.0.8...v8.0.9
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/mongodb/mongoid - 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::Documentinstance with an object that was not aMongoid::Documentinstance. - MONGOID-5780 ensures that calling
notmultiple times (e.g.Model.where.not.not) will toggle the criteria's negation state, rather than simply setting it totrue. - MONGOID-5816 prevents
attr_readonlyfrom 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: https://github.com/mongodb/mongoid/compare/v9.0.3...v9.0.4
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/mongodb/mongoid - 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
notpredicates together was not toggling the negation state (e.g.Model.where.not.not.not) - MONGOID-5816 --
attr_readonlywas 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_documentby @jamis in https://github.com/mongodb/mongoid/pull/5899 - MONGOID-5737 Fix issue where <=> errors if there's a non-document (backport for 8.1) by @DarshanaVenkatesh in https://github.com/mongodb/mongoid/pull/5917
- MONGOID-5780 Fix chaining nots resulting in incorrect negation state (backport for 8.1) by @DarshanaVenkatesh in https://github.com/mongodb/mongoid/pull/5915
- MONGOID-5816: attr_readonly leaks into sibling classes (backport for 8.1) by @DarshanaVenkatesh in https://github.com/mongodb/mongoid/pull/5920
- MONGOID-5831 Remove usage of Rails private API (#5908) by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5926
- Bump version to 8.1.8 by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5928
- try
bundle exec gem pushon rake release by @jamis in https://github.com/mongodb/mongoid/pull/5929 - Invalidate bundler cache when cutting a new gem by @jamis in https://github.com/mongodb/mongoid/pull/5930
- Deployment tweaks by @jamis in https://github.com/mongodb/mongoid/pull/5931
Full Changelog: https://github.com/mongodb/mongoid/compare/v8.1.7...v8.1.8
- Ruby
Published by mongodb-dbx-release-bot[bot] about 1 year ago
https://github.com/mongodb/mongoid - 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 https://github.com/mongodb/mongoid/pull/5882
- MONGOID-5819 Do not pass the :database option when creating a client by @jamis in https://github.com/mongodb/mongoid/pull/5890
- MONGOID-5823 Use proper thread-local variables instead of fiber-local variables by @jamis in https://github.com/mongodb/mongoid/pull/5896
- MONGOID-5818 Support Rails 8 (#5876) by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5898
Full Changelog: https://github.com/mongodb/mongoid/compare/v9.0.2...v9.0.3
- Ruby
Published by mongodb-dbx-release-bot[bot] over 1 year ago
https://github.com/mongodb/mongoid - 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 https://github.com/mongodb/mongoid/pull/5869
- MONGOID-5757 Fix validation checks so that all associated records are validated by @jamis in https://github.com/mongodb/mongoid/pull/5883
- MONGOID-5818 Support Rails 8 by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5897
Full Changelog: https://github.com/mongodb/mongoid/compare/v8.1.6...v8.1.7
- Ruby
Published by mongodb-dbx-release-bot[bot] over 1 year ago
https://github.com/mongodb/mongoid - 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
$pulland$popoperators not being handled correctly byupdateAll. - MONGOID-5789: Fix behavior when requesting an attribute with
nilas the name. Previously raised a spurious exception, now returns an empty string. - MONGOID-5797: When using a projection on a model with an
embeds_manyrelation, 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 https://github.com/mongodb/mongoid/pull/5800
- Mongoize is not called on update_all, when $set operator is used by @dem in https://github.com/mongodb/mongoid/pull/5815
- DOCSP-38361 - Add text to empty pages (#5826) by @jamis in https://github.com/mongodb/mongoid/pull/5827
- MONGOID-5789 Allow nil attribute access (backport of #5836) by @jamis in https://github.com/mongodb/mongoid/pull/5838
- MONGOID-5797 Fix accessing parent when projected (#5847) by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5849
- Fix mongoize update all array operators 8.1 by @JohnMaguir in https://github.com/mongodb/mongoid/pull/5824
- MONGOID-5806 Rails 7.2 Support (#5852) by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5860
- MONGOID-5793 Backport SSDLC changes from master by @jamis in https://github.com/mongodb/mongoid/pull/5865
- Prepare 8.1.6 release by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5864
- Prep for 8.1.6 by @jamis in https://github.com/mongodb/mongoid/pull/5867
Full Changelog: https://github.com/mongodb/mongoid/compare/v8.1.5...v8.1.6
- Ruby
Published by mongodb-dbx-release-bot[bot] over 1 year ago
https://github.com/mongodb/mongoid - 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 https://github.com/mongodb/mongoid/pull/5845
- MONGOID-5797 Fix accessing parent when projected by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5847
- MONGOID-5806 Rails 7.2 Support by @AlexKovynev in https://github.com/mongodb/mongoid/pull/5852
- MONGOID-5808 Fix collection_options in store_in by @comandeo-mongo in https://github.com/mongodb/mongoid/pull/5859
New Contributors
- @AlexKovynev made their first contribution in https://github.com/mongodb/mongoid/pull/5852
Full Changelog: https://github.com/mongodb/mongoid/compare/v9.0.1...v9.0.2
- Ruby
Published by mongodb-dbx-release-bot[bot] over 1 year ago
https://github.com/mongodb/mongoid - 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 https://github.com/mongodb/mongoid/pull/5814
- Fix mongoize update all array operators master by @JohnMaguir in https://github.com/mongodb/mongoid/pull/5823
- DOCSP-38361 - Add text to empty pages by @mongoKart in https://github.com/mongodb/mongoid/pull/5826
- MONGOID-5508 touch on custom field by @adviti-mishra in https://github.com/mongodb/mongoid/pull/5829
- RUBY-3489: Add empty SBOM lite file by @alcaeus in https://github.com/mongodb/mongoid/pull/5830
- MONGOID-5786: Fix some compatibility issues with Enumerable API by @cperezabo in https://github.com/mongodb/mongoid/pull/5831
- MONGOID-5785 allow named scopes to remove a default scope by @jamis in https://github.com/mongodb/mongoid/pull/5832
- MONGOID-5743 SSDLC Requirements by @jamis in https://github.com/mongodb/mongoid/pull/5834
- MONGOID-5789 database_field_name given nil or empty string should raise UnknownAttribute exception by @danhealy in https://github.com/mongodb/mongoid/pull/5836
- DOP-4809: Remove docs/ since it has been migrated to mongodb/docs-mongoid by @i80and in https://github.com/mongodb/mongoid/pull/5840
- MONGOID-5790 MONGOID-5791 Fix error caused by loading a referenced class prematurely by @jamis in https://github.com/mongodb/mongoid/pull/5839
- Modified the comment to rightly indicate the error being raised is In… by @adviti-mishra in https://github.com/mongodb/mongoid/pull/5841
- 5688: Run callbacks for children within fibers by @adviti-mishra in https://github.com/mongodb/mongoid/pull/5837
- Added a pointer to docs-mongoid in the README.md by @adviti-mishra in https://github.com/mongodb/mongoid/pull/5843
New Contributors
- @mongoKart made their first contribution in https://github.com/mongodb/mongoid/pull/5826
- @adviti-mishra made their first contribution in https://github.com/mongodb/mongoid/pull/5829
- @cperezabo made their first contribution in https://github.com/mongodb/mongoid/pull/5831
- @danhealy made their first contribution in https://github.com/mongodb/mongoid/pull/5836
- @i80and made their first contribution in https://github.com/mongodb/mongoid/pull/5840
Full Changelog: https://github.com/mongodb/mongoid/compare/v9.0.0...v9.0.1
- Ruby
Published by mongodb-dbx-release-bot[bot] over 1 year ago
https://github.com/mongodb/mongoid - Mongoid 9.0
Mongoid 9.0 is a new major update to the Mongoid ODM. It includes many bug fixes, updates, improvements, and new features.
Significant new features include the following:
- You can now create and manage Atlas search indexes directly from Mongoid, by specifying your search index definitions directly on the relevant models. (MONGOID-5601)
- You can now declare a transaction with a block, using syntax that should be familiar to Rails programmers. (You must still be using a MongoDB topology that supports transactions, like a replica-set or sharded topology.) Along with this new syntax, support has also been added for
after_commitandafter_rollbackcallbacks. (MONGOID-5530, MONGOID-5531 and MONGOID-5708) - Around callbacks on embedded documents are now disabled by default, for performance reasons. If a parent document has a large number (hundreds) of embedded documents, it is possible for the stack to be exhausted while processing "around" callbacks for those embedded documents. If you need around callbacks for your embedded documents, and you are confident that you will not have large numbers of embedded documents in a single parent, you can enable around callbacks with the
Mongoid.around_embedded_document_callbacksconfiguration option. (MONGOID-5658) - A new serializer has been added to allow
BSON::ObjectIdinstances to be serialized and deserialized by ActiveJob. (MONGOID-5611) - If you specify custom storage options when loading a model (e.g. overriding its collection name, database name, or the named client), you will not need to explicitly specify those same options when saving the model. The model will remember the storage options that were active when it was loaded. (MONGOID-5472)
- Support for "sandbox mode" in the Rails console has been added. As long as you are using a supported topology (replica-set or sharded, for example), when you specify
--sandboxwhen starting the Rails console, your console session will be wrapped in a transaction. (MONGOID-4901) - You can now enjoy Client-Side Field Level Encryption (CSFLE) in Mongoid with supported database server versions. Declare your CSFLE schemas in your documents, configure your encryption in
mongoid.ymlorconfig.rb, and generate new data keys viarake. (MONGOID-5585, MONGOID-5587, MONGOID-5589, MONGOID-5592, MONGOID-5613, MONGOID-5615.)
Many other changes are included as well, including the following:
- Support for Rails 2.6 and Rails 5 have been dropped. (MONGOID-5574)
- Support has been added for JRuby 9.4, and BSON 5. (MONGOID-5575, MONGOID-5739, RUBY-2846)
- Added
Mongoid.reconnect_clientsin conjunction with improving documentation about working with forking webservers. (MONGOID-5758) - Saving a model in a session other than the one that loaded it will now result in a warning message (as this is generally considered a bug.) (MONGOID-5552)
- Eager loading now works with embedded associations. These associations cannot actually be eager loaded, but this allows you to chain eager loading through embedded associations, for example with has-and-belongs-to-many associations. (MONGOID-5052)
- For embedded associations, the default is now
touch: true. This means that when you update an embedded document, its parent is automatically touched (or saved, with the timestamps updated) as well. (MONGOID-5016) - You can now prevent Mongoid from type-casting a given value in a query by wrapping it with
Mongoid::RawValue. This makes it easier to deal with legacy data that does not conform to an expected type. (MONGOID-5408) - The Rails generator for Mongoid (
rails g mongoid:config) now additionally generates a defaultconfig/initializers/mongoid.rb. (MONGOID-5439) - When calling
#touchon a model, Mongoid now clears the 'changed' state of the model. Previously,#touchleft the model in a 'changed' state, even though it had been persisted by the touch operation. (MONGOID-5504) - Mongoid's
db:mongoid:create_indexesrake task was not always loading all models before creating the indexes, resulting in some missing indexes. This is now fixed. (MONGOID-5547) - Added support for
$min,$max, and$muloperators (viaset_min,set_max, andmul), as well as$setOnInsertwhen doing an upsert (via a new:set_on_insertoption to#upsert). (MONGOID-5442) - A timezone configured in your app (via
Time.zone=) will now be used when typecasting dates for time-valued fields. (MONGOID-5488) - Typecasting strings for numeric fields now correctly converts the strings into
BigDecimalvalues. (MONGOID-5484) - Field aliases are now honored in index specifications. (MONGOID-5314)
- Fixed an issue where an empty list in a HABTM association needed special handling (instead of blindly using an empty list with
$in). (MONGOID-5164) - Attempting to call
estimated_countwhen a default scope is active on a collection now raises a dedicated exception (Mongoid::Errors::InvalidEstimatedCountScoping) (MONGOID-4960) - Mongoid now raises
Mongoid::Errors:AttributeNotLoadedwhen a program attempts to access a field that is defined on the model, but which was excluded by the query's projection. Previously,ActiveModel::MissingAttributeErrorwas raised in this situation. (MONGOID-5467) - When assigning an array of Hashes to a field, the hashes are always converted to a
BSON::Document. This makes the behavior consistent with how those fields are loaded from the database. (MONGOID-5410)
Additionally, a number of methods that were monkey-patched onto core modules have been deprecated, including the following:
Array#multi_arged?(MONGOID-5669)BigDecimal#__to_inc__(MONGOID-5662)Hash#__consolidate__(MONGOID-5654)Hash#__mongoid_unsatisfiable_criteria?(MONGOID-5671)Hash#__nested__(MONGOID-5653)Hash#delete_id(MONGOID-5670)Hash#extract_id(MONGOID-5670)Hash#to_criteria(MONGOID-5677)Integer#unconvertable_to_bson?Object#__find_args__(MONGOID-5665)Object#__mongoize_fk__(MONGOID-5675)Object#__setter__(MONGOID-5664)Object#__sortable__(MONGOID-5663)Object#__to_inc__(MONGOID-5662)Object#blank_criteria?(MONGOID-5671)Object#do_or_do_not(MONGOID-5673)Object#regexp?(MONGOID-5674)Object#you_must(MONGOID-5673)String#mongoid_id?(MONGOID-5668)String#unconvertable_to_bson?(MONGOID-5667)Symbol#mongoid_id?(MONGOID-5668)Time#configured(MONGOID-5676)
Also, Criteria#for_js has been deprecated (MONGOID-5651), and Mongoid::QueryCache (which was previously deprecated) has been removed (MONGOID-5625).
- Ruby
Published by jamis almost 2 years ago
https://github.com/mongodb/mongoid - 8.1.5
This patch release includes the following fixes:
MONGOID-5704: By default, associations (like belongs_to) are validated when a document is saved. However, Mongoid was aggressively loading persisted associations and validating them, which led to a significant performance regression in Mongoid 8+ (versus Mongoid 7.x). This patch fixes this regression by only validating associations that are (1) currently in-memory, and (2) either unpersisted or modified.
MONGOID-5709: has_and_belongs_to_many associations on embedded docments were broken, and attempting to use them would result in an "InvalidPath" exception. This patch release fixes that bug.
- Ruby
Published by jamis about 2 years ago
https://github.com/mongodb/mongoid - 8.0.8
This patch release includes the following fixes:
MONGOID-5704: By default, associations (like belongs_to) are validated when a document is saved. However, Mongoid was aggressively loading persisted associations and validating them, which led to a significant performance regression in Mongoid 8+ (versus Mongoid 7.x). This patch fixes this regression by only validating associations that are (1) currently in-memory, and (2) either unpersisted or modified.
MONGOID-5709: has_and_belongs_to_many associations on embedded docments were broken, and attempting to use them would result in an "InvalidPath" exception. This patch release fixes that bug.
- Ruby
Published by jamis about 2 years ago
https://github.com/mongodb/mongoid - 8.1.4
This is a patch release in 8.1.x series fixes the following issue:
We strongly recommend to upgrade to this version if you use 8.1.3.
This release also adds the following improvement:
- Ruby
Published by comandeo over 2 years ago
https://github.com/mongodb/mongoid - 8.1.3
This is a patch release in 8.1.x series that adds support for Rails 7.1.
The following issues were fixed:
- MONGOID-5658 Fix callbacks for embedded
- MONGOID-5686 Fix array operations in update_all
- MONGOID-5647 Allow #count to be used with #for_js
- Ruby
Published by comandeo over 2 years ago
https://github.com/mongodb/mongoid - 8.0.7
This is a patch release in 8.0.x series that adds support for Rails 7.1.
The following issues were fixed:
- MONGOID-5658 Fix callbacks for embedded
- MONGOID-5686 Fix array operations in update_all
- MONGOID-5647 Allow #count to be used with #for_js
- Ruby
Published by comandeo over 2 years ago
https://github.com/mongodb/mongoid - 8.1.2
Mongoid 8.1.2 is a patch release in the 8.1 series, addressing the following issues:
- MONGOID-5631 Resolve Mongoid compatibility issues with bson-ruby deserializing decimal128 to BigDecimal
- MONGOID-5642 Queryable::Selector#merge! does not properly handle :$in/:$nin keys
- MONGOID-5632 update_all does not map :as option of the field properly
- MONGOID-5624 Error when using store_as after upgrade to Ruby 3.2.2 & Rails 7.0
- MONGOID-5643 Storable#add_field_expression add values with same operator keys using $and when value is a hash with symbol operator key
The following issue was also done, affecting only a clean-up of old documentation:
- Ruby
Published by jamis over 2 years ago
https://github.com/mongodb/mongoid - 8.0.6
Mongoid 8.0.6 is a patch release in the 8.0 series, addressing the following issues:
- MONGOID-5631 Resolve Mongoid compatibility issues with bson-ruby deserializing decimal128 to BigDecimal
- MONGOID-5642 Queryable::Selector#merge! does not properly handle :$in/:$nin keys
- MONGOID-5632 update_all does not map :as option of the field properly
- MONGOID-5624 Error when using store_as after upgrade to Ruby 3.2.2 & Rails 7.0
- MONGOID-5643 Storable#add_field_expression add values with same operator keys using $and when value is a hash with symbol operator key
The following issue was also done, affecting only a clean-up of old documentation:
- Ruby
Published by jamis over 2 years ago
https://github.com/mongodb/mongoid - 7.5.4
Mongoid 7.5.4 is a patch release in the 7.5 series, addressing the following issues:
- MONGOID-5642 Queryable::Selector#merge! does not properly handle :$in/:$nin keys
- MONGOID-5643 Storable#add_field_expression add values with same operator keys using $and when value is a hash with symbol operator key
The following issue was also done, affecting only a clean-up of old documentation:
- Ruby
Published by jamis over 2 years ago
https://github.com/mongodb/mongoid - 8.1.1
Mongoid 8.1.1 is a patch release in the 8.x series. It fixes the following issue:
It also corrects the following documentation error:
- Ruby
Published by jamis over 2 years ago
https://github.com/mongodb/mongoid - 8.0.5
Mongoid 8.0.5 is a patch release in the 8.0 series with one bug fix:
- Ruby
Published by jamis over 2 years ago
https://github.com/mongodb/mongoid - 8.1.0
Mongoid 8.1.0 is a feature release in 8.x series with the following significant new functionality:
- MONGOID-5370 API for creating time series collections
- MONGOID-4528 Support for 'saved_change_to_attribute', 'attribute_before_last_save' and 'will_save_change_to_attribute'
- MONGOID-5293 Add Rails-style defaults &
config.load_defaults. - MONGOID-5445 Concurrent query execution
- MONGOID-5596 Deprecate Mongoid::QueryCache in favor of Mongo::QueryCache
The following issues were fixed:
- MONGOID-5542 Prevention of double calls in callbacks
- MONGOID-5600 Mongoid 8 breaks "build"
- MONGOID-5520 Criteria ordering fails for non-numeric values (ex: { '$meta' => 'textScore' })
- MONGOID-5582 Support shard keys based on subdocument fields
- MONGOID-5474 Raise Mongoid::Errors::ReadonlyDocument when saving readonly documents
- MONGOID-5417 Memory leak when using with()
- MONGOID-5539 Find requires Pipeline aggregation to be coerced into an array
- MONGOID-5547 rake db:mongoid:create_indexes fails for models that are stored outside of /app/models.
- MONGOID-3834 unable to access parent when setting child attribute
- MONGOID-5441 Thread.current[:session] is not prefixed
- MONGOID-5436 legacy_triple_equals used incorrectly
The following additional improvements were made:
- MONGOID-5465 Single-value .in should convert to .where (resolve deprecated .in scalar value behavior)
- MONGOID-5620 delete_one on embeds_many is callable and is not consistent with delete
- MONGOID-5617 Improve performance of _matches?()
- MONGOID-5595 Forward explain options to driver
- MONGOID-5590 Shard keys do not support fields with "." in their name
- MONGOID-5509 Deprecate feature flags which were introduced in Mongoid 7.x
- MONGOID-5226 Allow setting "store_in collection" on document subclass
- MONGOID-4698 Warn about attempts to define text_search scope (and others?)
- MONGOID-5458 Document fallbacks option on localized fields
- MONGOID-4403 Support Dirty Tracking changed from /to
- MONGOID-5438 Implement local override for i18n parameters
- MONGOID-5437 Extract fallback enabling logic into macro
- MONGOID-5334 Review mongoization/demongoization/evolution behavior for localized fields
- MONGOID-5490 Deprecate and remove use_activesupport_time_zone (should always be true)
- MONGOID-5228 Allow _ids to be modified in embedded documents
- MONGOID-5453 Add .none_of query method
- MONGOID-5363 Change #upsert to perform updating upsert rather than replacing upsert
- MONGOID-5281 Respect aliases in embedded documents when querying
- MONGOID-5100 ActiveRecord parity: allow selector arguments for .exists?
- MONGOID-5264 Add some way to strip out blank localized values before saving model
- MONGOID-5422 Mongoid.configure should allow arg-less block
- MONGOID-4979 Add :touch option to model save method
- MONGOID-5418 AR Feature Parity first!/last!/second etc.
- Ruby
Published by comandeo over 2 years ago
https://github.com/mongodb/mongoid - 7.5.3
Mongoid 7.5.3 is a patch release in 7.5 series with a few bug fixes:
- MONGOID-5546 First/Last failures when empty hash passed as criteria
- MONGOID-5582 Support shard keys based on subdocument fields
- MONGOID-5352 Fix assign_attributes on replacing embeds_many
The following additional improvements were made:
- Ruby
Published by comandeo over 2 years ago
https://github.com/mongodb/mongoid - 8.0.4
Mongoid 8.0.4 is a patch release in 8.0 series with a few bug fixes:
- MONGOID-5520 Criteria ordering fails for non-numeric values (ex: { '$meta' => 'textScore' })
- MONGOID-5539 Find requires Pipeline aggregation to be coerced into an array
- MONGOID-5582 Support shard keys based on subdocument fields
- MONGOID-5600 Mongoid 8 breaks "build"
The following additional improvements were made:
- MONGOID-5465 Single-value .in should convert to .where (resolve deprecated .in scalar value behavior)
- MONGOID-5590 Shard keys do not support fields with "." in their name
- MONGOID-5560 delete_one on embeds_many is callable and is not consistent with delete
- MONGOID-5617 Improve performance of _matches?()
- Ruby
Published by comandeo over 2 years ago
https://github.com/mongodb/mongoid - 8.0.3
This patch release in the 8.0 series fixes the following issues:
- MONGOID-5417 Memory leak when using with()
- MONGOID-5456 New "uncastable" behavior does't work with ActiveSupport::Duration
- MONGOID-5441 Thread.current[:session] is not prefixed
The the following minor improvement were added:
- MONGOID-4698 Warn about attempts to define text_search scope (and others?)
- MONGOID-5334 Review mongoization/demongoization/evolution behavior for localized fields
- MONGOID-5433 Rails 7 deprecates Time#to_s(format) and replaces it with Time#to_fs(format)
- MONGOID-5437 Extract fallback enabling logic into macro
- Ruby
Published by comandeo about 3 years ago
https://github.com/mongodb/mongoid - 7.5.2
This patch release in the 7.5 series adds the following minor improvements and bug fixes:
- MONGOID-5255 Do not allow reuse of a closed client
- MONGOID-5417 Fix memory leak when call 'with'
- MONGOID-5452 Add legacy_attributes to 7.5
- MONGOID-5433 Replace calls of Time#to_s(format) with Time#to_formatted_s
- Ruby
Published by comandeo over 3 years ago
https://github.com/mongodb/mongoid - 8.0.2
This patch release in the 8.0 series adds the following minor improvement:
The following issues have been fixed:
- MONGOID-5435 ArgumentError when scope block has positional and keyword arguments
- MONGOID-5436 legacy_triple_equals used incorrectly
Also read the full Mongoid 8.0 release notes.
- Ruby
Published by p-mongo over 3 years ago
https://github.com/mongodb/mongoid - 7.5.1
This patch release in the 7.4 series fixes the following issues:
- MONGOID-5435 ArgumentError when scope block has positional and keyword arguments
- MONGOID-5436 legacy_triple_equals used incorrectly
- Ruby
Published by p-mongo over 3 years ago
https://github.com/mongodb/mongoid - 7.4.3
This patch release in the 7.4 series fixes the following issue:
- Ruby
Published by p-mongo over 3 years ago
https://github.com/mongodb/mongoid - 8.0.1
Mongoid 8.0 is a feature release with the following significant new functionality:
- MONGOID-4627 Callback behavior during persistence operations fixed
- MONGOID-4641 Ability to store BigDecimal fields as decimal128 in the database
- MONGOID-5332 Consistent mongoization, demongoization and evolution of unconvertable values
- MONGOID-5428 Ability to set driver options in mongoid.yml
- MONGOID-5365 Change #attributes return value to Hash with a flag
The following additional improvements were made:
- MONGOID-4547 Implement #take / #take! for AR feature parity
- MONGOID-5270 Implement .tally method for Mongoid#Criteria
- MONGOID-4998 Support limit argument in #first and #last, :id_sort option removed
- MONGOID-5351 Implement Dots and Dollars in Mongoid
- MONGOID-5098 Mongoize Range endpoints + support begin-less/end-less ranges
- MONGOID-5003 Delegate Model#find with block argument to Enumerable#find
- MONGOID-5180 Rails parity: Add #pick method (equivalent to pluck.first)
- MONGOID-5315 Accept formatted strings in Date/Time/DateTime.demongoize
- MONGOID-5217 Add attribute_previously_was helpers
- MONGOID-5390 #pluck in memory should return nil values (non-compacted)
- MONGOID-5402 In-memory pluck, distinct should support dot-notation for field path traversal
- MONGOID-5404 Populate attributes_before_type_cast on read from database
- MONGOID-3267 Allow associations to be used inside defaults
- MONGOID-4500 Mongoid::Contextual::Aggregable::Memory should ignore nil and non-numeric values
The following minor improvements were made:
- MONGOID-5376 Use exists? or any? instead of count to determine existence of any document
- MONGOID-5306 Use pluck instead of only to avoid projecting when referencing association _ids
- MONGOID-5353 Change "taken" error message text to match ActiveRecord / Rails I18n
- MONGOID-5327 Prohibit using undefined string/symbol types when declaring fields
The following functionality was deprecated:
The following functionality was removed:
- MONGOID-5414 Remove criteria/contextual caching
- MONGOID-4686 Remove Document#to_a
- MONGOID-5302 Remove update_values method from Hash and Array extensions
- MONGOID-5323 Remove deprecated Mongoid::Errors::EagerLoad
- MONGOID-5341 Remove drop_dup options from index macro
- MONGOID-5322 Remove deprecated geo_spacial method
- MONGOID-5324 Remove deprecated constants
- MONGOID-5426 Remove pluck behavior from map
The following issues were fixed:
- MONGOID-5089 Incorrect foreign key value set in has_many target when an orphan child is associated with parent via its id
- MONGOID-5104 attribute_was returns previous value in after_save callback
- MONGOID-2306 cascade_callbacks not working using before_create and <<
- MONGOID-3601 Don't mark embedded objects as persisted when the parent is invalid
- MONGOID-4160 Don't persist document if associated document is invalid with optional: false
- MONGOID-4397 update_attributes does not reflect changes to embedded documents in the attributes hash
- MONGOID-4476 Writes in callbacks of nested embedded documents are not persisted when top-level document is modified via update_attributes
- MONGOID-4520 Set inverse keys on HABTM relationship when subsequently persisting document
- MONGOID-4646 has_one - belongs_to with optional:true incorrectly clears association when assigned itself
- MONGOID-4843 don't populate .changed_attributes setting has_and_belongs_to_many association
- MONGOID-4911 Range expansion must use $elemMatch to ensure both $gte and $lte match the same array element
- MONGOID-5034 When excluded from query, embeds many relations are returned as empty array instead of raising MissingAttributeError
- MONGOID-5037 destroy_all with conditions argument constrains the embedded documents being destroyed with their full attribute tree
- MONGOID-5039 Multiple polymorphic embeds cause wrong association to be assigned
- MONGOID-5043 'where' query incorrectly works for belongs_to relations with custom primary_key
- MONGOID-5078 Background jobs queued during after_save, which atomically query sharded documents, fail because of atomic_selector.
- MONGOID-5079 clear has_many association locally after destroy_all
- MONGOID-5110 Parent ID missing in after_destroy callback when removing via nested attribute
- MONGOID-5172 Criteria#any_of with multiple arguments incorrectly adds conditions to existing top-level $or if one is already present
- MONGOID-5190 Respect persistence options on auto-saved associations
- MONGOID-2586 cannot access parent object in the after_find function
- MONGOID-3291 Clear inverse associations when setting across all association types
- MONGOID-4316 Eager loading loads unnecessary documents when multiple associations reference the same model class
- MONGOID-4514 Counter cache not decremented when nullifying relation/association
- MONGOID-4705 Inverse association not populated for HABTM when using class_name
- MONGOID-4716 Fix eager loading of nested referenced associations
- MONGOID-4811 Output controller runtime stats in milliseconds as per Rails requirements
- MONGOID-4823 Values for BSON::Binary fields are not converted to Binary
- MONGOID-4838 safely use #clone method on embedded children with fields changed/removed
- MONGOID-4869 Setting an embeds_many association to empty array does not persist it when a document is created
- MONGOID-5255 Unexpected client close with Runtime Persistence
- MONGOID-5269 Persist writing an attribute after a removal correctly
- MONGOID-5280 Mongoid 7.4 inserts only one embedded document when multiple documents are created with nil _id
- MONGOID-5344 Using concat on has_and_belongs_to_many ids default value is not working the first time
- MONGOID-5352 Fix assign_attributes on replacing embeds_many
- MONGOID-5379 The use runtime persistence raises an error for updates
- MONGOID-5380 Assignment of embedded association doesn't work when used before another association assignment
- MONGOID-5416 Mongoid::Contextual#last modifies the sort on the view
Mongoid 8 requires MongoDB 3.6 or newer, Ruby 2.6 or newer, JRuby 9.3 or newer, ActiveSupport 5.2 or newer. Older versions of these libraries and environments are not supported.
Mongoid 8.0.1 is the first release in the 8.0 series. The 8.0.0 release was yanked due to incorrect gem dependency on a pre-release driver version.
- Ruby
Published by p-mongo over 3 years ago
https://github.com/mongodb/mongoid - 7.5.0
This release in the 7.x series is primarily intended to assist with migration to Mongoid 8. To this end, Mongoid 7.5 adds deprecation warnings for functionality removed in Mongoid 8. Some of the new functionality in Mongoid 8 is also available in 7.5, as follows:
- MONGOID-4547 Implement #take / #take! for AR feature parity
- MONGOID-4998 limit arguments to #first and #last methods
- MONGOID-5402 In-memory pluck, distinct support dot notation for field path traversal
The following deprecations have been added:
- MONGOID-5431 Deprecate criteria/contextual caching
- MONGOID-5318 Deprecate "background" index option as per MongoDB 4.2+
- MONGOID-5430 Deprecate pluck behavior in map
The following issues were fixed:
Mongoid 7.5 adds support for JRuby 9.3 and deprecates support for JRuby 9.2. Mongoid 8 will require JRuby 9.3 or newer.
- Ruby
Published by p-mongo over 3 years ago
https://github.com/mongodb/mongoid - 7.4.1
This patch release in the 7.4 series adds support for MongoDB 6.0 and the following improvement:
The following issues have been fixed:
- MONGOID-5079 clear has_many association locally after destroy_all
- MONGOID-5352 Fix assign_attributes on replacing embeds_many
- Ruby
Published by p-mongo over 3 years ago
https://github.com/mongodb/mongoid - 7.3.5
This patch release in the 7.3 series fixes the following issues:
- MONGOID-5079 clear has_many association locally after destroy_all
- MONGOID-5352 Fix assign_attributes on replacing embeds_many
- Ruby
Published by p-mongo over 3 years ago
https://github.com/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
$andclause in query is overwritten bywherecondition - 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
- Ruby
Published by p-mongo almost 4 years ago
https://github.com/mongodb/mongoid - 7.3.4
This patch release in the 7.3 series adds compatibility with Rails 7.
The following bug was fixed:
- Ruby
Published by comandeo about 4 years ago
https://github.com/mongodb/mongoid - 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
- Ruby
Published by p-mongo over 4 years ago
https://github.com/mongodb/mongoid - 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:
- Ruby
Published by p-mongo over 4 years ago
https://github.com/mongodb/mongoid - 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:
- MONGOID-5136 .touch with custom field is broken for embedded documents
- MONGOID-5149 Do not try to detect inverse if it is explicitly set to nil
- Ruby
Published by p-mongo over 4 years ago
https://github.com/mongodb/mongoid - 7.3.2
This patch release in the 7.3 series fixes the following bug:
- MONGOID-5123 Association proxies
method_missingdoes not handle keyword args
- Ruby
Published by comandeo over 4 years ago
https://github.com/mongodb/mongoid - 7.2.5
This patch release in the 7.2 series fixes the following bug:
- MONGOID-5123 Association proxies
method_missingdoes not handle keyword args
- Ruby
Published by comandeo over 4 years ago
https://github.com/mongodb/mongoid - 7.1.10
This patch release in the 7.1 series fixes the following bug:
- MONGOID-5123 Association proxies
method_missingdoes not handle keyword args
- Ruby
Published by comandeo over 4 years ago
https://github.com/mongodb/mongoid - 7.1.9
This patch release in the 7.1 series adds compatibility with Ruby 3.
- Ruby
Published by comandeo over 4 years ago
https://github.com/mongodb/mongoid - 7.2.4
This patch release in the 7.2 series adds compatibility with Ruby 3.
- Ruby
Published by comandeo over 4 years ago
https://github.com/mongodb/mongoid - 7.3.1
This patch release in the 7.3 series adds compatibility with Ruby 3.
The following bug was fixed:
- Ruby
Published by comandeo over 4 years ago
https://github.com/mongodb/mongoid - 7.3.0
This feature release of Mongoid adds the following new functionality:
- MONGOID-5036 Delegate to driver's query cache middleware when available
- MONGOID-4812 Allow id to be a regular field in models (not an alias of _id)
- MONGOID-4906 Add missing general-purpose operators to embedded matchers
- MONGOID-4757 Mongoid now warns about unknown options given at top level in YAML configuration
The following significant changes were made:
- MONGOID-4753 Make global Boolean definition opt-in
- MONGOID-3468 Always touch parents of embedded documents when embedded documents are touched
- MONGOID-5023 Expand all conditions in a single argument together in
wherepath - MONGOID-4706 Remove the internal Targets module
- MONGOID-5060 #delete no longer causes dependent associations to be destroyed
- MONGOID-5073
Mongoid.purge!andMongoid.truncaterespect global persistence context overrides
The following bugs were fixed:
- MONGOID-4982 Cannot update a field on embedded association member, add another member and add a nested association to the first member in the same save call
- MONGOID-5020 Condition lifting breaks with symbol operators on Ruby <= 2.6
- MONGOID-5032 Hash attribute access/read_attribute fails on embedded field when parent loaded with only
Please see the upgrading documentation for more detailed descriptions of the changes.
- Ruby
Published by p-mongo almost 5 years ago
https://github.com/mongodb/mongoid - 7.2.3
This patch release in the 7.2 series adds an upgrading note for the following change that was made in 7.2.0 release:
- Ruby
Published by p-mongo almost 5 years ago
https://github.com/mongodb/mongoid - 7.1.8
This patch release in the 7.1 series fixes the following issues:
- MONGOID-5042 rails g mongoid:config is not working on Rails 6.1
- MONGOID-5059
setnilifies attributes excluded viaonly - MONGOID-5076 reload fails to find document when the document's sharded field has been updated
- Ruby
Published by p-mongo almost 5 years ago
https://github.com/mongodb/mongoid - 7.0.13
This patch release in the 7.0 series fixes the following issues:
- MONGOID-5042 rails g mongoid:config is not working on Rails 6.1
- MONGOID-5059
setnilifies attributes excluded viaonly - MONGOID-4672 Default order in
embeds_manyassociation causes association to use/return stale data - MONGOID-5076 reload fails to find document when the document's sharded field has been updated
- Ruby
Published by p-mongo almost 5 years ago
https://github.com/mongodb/mongoid - 7.2.2
This patch release in the 7.2 series repairs a Rails 6.1 incompatibility in the Mongoid config generator and fixes several user-reported problems. The following issues have been resolved:
- MONGOID-5042 rails g mongoid:config is not working on Rails 6.1
- MONGOID-5063 Support numeric path components as hash keys when embedded matching
- MONGOID-5069 Support numeric path components resolving to hash keys under arrays when embedded matching
- MONGOID-5059
setnilifies attributes excluded viaonly - MONGOID-5068 ElemMatch matcher operates on pre-stringified keys in condition verification path against impossible values
- MONGOID-5076 reload fails to find document when the document's sharded field has been updated
- Ruby
Published by p-mongo almost 5 years ago
https://github.com/mongodb/mongoid - 7.2.1
This patch release in the 7.2 series adds compatibility with Rails 6.1 and fixes the following issues:
- MONGOID-5033 Cannot use any_of with multiple conditions when using symbol operators on Time fields and passing Date instances
- MONGOID-5035 Query embedded documents by date field with $gt/gte/lt/lte does not find existing documents
- Ruby
Published by p-mongo about 5 years ago
https://github.com/mongodb/mongoid - 7.1.7
This patch release in the 7.1 series adds compatibility with Rails 6.1 and fixes the following issues:
- Ruby
Published by p-mongo about 5 years ago
https://github.com/mongodb/mongoid - 7.0.12
This patch release in the 7.0 series adds compatibility with Rails 6.1.
- Ruby
Published by p-mongo about 5 years ago
https://github.com/mongodb/mongoid - 7.2.0
This feature release of Mongoid includes the following principal changes:
- Embedded matchers have been largely rewritten. In several cases the behavior of Mongoid matchers was changed to match MongoDB server. Please see the upgrading guide section for detailed changes.
Model#countis now implemented using the aggregation pipeline$countstage.Model#estimated_countmethod was added to provide the estimated count thatModel#countused to provide. This change should be transparent to most applications but may increase runtime for applications that call#count, especially with complex conditions (with the benefit being of#countproducing accurate results). See this upgrading guide section for further details.- Discriminator key and value can now be overridden for models using inheritance.
- Shard key is now used when reloading models for improved performance in sharded deployments.
- The query cache was moved to the driver. Mongoid 7.2 will transparently use the query cache implementation in driver versions 2.14 and higher, with a fallback on the legacy query cache implementation that will continue to be provided for when Mongoid is used with older driver versions. The driver's query cache implementation provides new features such as caching the aggregation pipelines and more fine grained cache expiration. Both the driver's query cache implementation and Mongoid's legacy query cache implementation also contain fixes to known issues like inability to cache results when they are returned in multiple batches from the server.
The following additional improvements were made:
- MONGOID-4913 StringifiedSymbol field to expose strings as symbols in Ruby
- MONGOID-4914 Unmask Enumerable#find on one to many associations
- MONGOID-4522 Make #any? not retrieve entire result set, like #exists?
- MONGOID-4703 Add geo_spatial as an alias for geo_spacial
The following bugs have been fixed:
- MONGOID-4977 Use new send_initial_query signature in Mongoid QueryCache
- MONGOID-4890 Destroying model instances with dependent associations in transactions raises OperationFailure due to use of (deprecated) count
- MONGOID-4947 #any? method with block given does not behave as per Enumerable
- MONGOID-4980 Atomic push incorrectly determines whether there is a conflict
- MONGOID-5013 Re-associating identical object destroys itself for dependent: :destroy
- MONGOID-5002 parent.child = Child.new raises TypeError when there's no inverse relation for belongs_to with has_one parent
Support for Ruby MRI versions 2.3 and 2.4 has been deprecated as of this release. See this ticket for more details. We intend to stop supporting these Ruby versions as of Mongoid 7.3.
Please read the upgrading guide for the detailed list of changes, major new features and upgrading guidance.
- Ruby
Published by p-mongo over 5 years ago
https://github.com/mongodb/mongoid - 7.1.6
This patch release in the 7.1 series fixes the following issue:
- Ruby
Published by p-mongo over 5 years ago
https://github.com/mongodb/mongoid - 6.4.8
This is a patch release in the Mongoid 6.4 series. This release fixes the following bug:
- Ruby
Published by egiurleo over 5 years ago
https://github.com/mongodb/mongoid - 7.0.11
This is a patch release in the Mongoid 7.0 series. This release fixes the following bug:
- Ruby
Published by egiurleo over 5 years ago
https://github.com/mongodb/mongoid - 7.1.5
This is a patch release in the Mongoid 7.1 series. This release fixes the following bug:
- Ruby
Published by egiurleo over 5 years ago
https://github.com/mongodb/mongoid - 7.2.0.rc1
This is a preview of the next feature release of Mongoid.
Mongoid 7.2 includes the following principal changes:
- Embedded matchers have been largely rewritten. In several cases the behavior of Mongoid matchers was changed to match MongoDB server. Please see the upgrading guide section for detailed changes.
Model#countis now implemented using the aggregation pipeline$countstage.Model#estimated_countmethod was added to provide the estimated count thatModel#countused to provide. This change should be transparent to most applications but may increase runtime for applications that call#count, especially with complex conditions (with the benefit being of#countproducing accurate results). See this upgrading guide section for further details.- Discriminator key and value can now be overridden for models using inheritance.
- Shard key is now used when reloading models for improved performance in sharded deployments.
- The query cache was moved to the driver. Mongoid 7.2 will transparently use the query cache implementation in driver versions 2.14 and higher, with a fallback on the legacy query cache implementation that will continue to be provided for when Mongoid is used with older driver versions. The driver's query cache implementation provides new features such as caching the aggregation pipelines and more fine grained cache expiration. Both the driver's query cache implementation and Mongoid's legacy query cache implementation also contain fixes to known issues like inability to cache results when they are returned in multiple batches from the server.
The following additional improvements were made:
- MONGOID-4914 Unmask Enumerable#find on one to many associations
- MONGOID-4948 Add Mongoid to driver's wrapping libraries
- MONGOID-4522 Make #any? not retrieve entire result set, like #exists?
- MONGOID-4703 Add geo_spatial as an alias for geo_spacial
The following bugs have been fixed:
- MONGOID-4977 Use new send_initial_query signature in Mongoid QueryCache
- MONGOID-4890 Destroying model instances with dependent associations in transactions raises OperationFailure due to use of (deprecated) count
- MONGOID-4947 #any? method with block given does not behave as per Enumerable
- MONGOID-4980 Atomic push incorrectly determines whether there is a conflict
Support for Ruby MRI versions 2.3 and 2.4 has been deprecated as of this release. See this ticket for more details. We intend to stop supporting these Ruby versions as of Mongoid 7.3.
Please read the upgrading guide for the detailed list of changes, major new features and upgrading guidance.
- Ruby
Published by egiurleo over 5 years ago
https://github.com/mongodb/mongoid - 7.1.4
This patch release in the Mongoid 7.1 series adds the following improvements:
The following bugs have also been fixed:
- MONGOID-4944 Ensure that cached queries with limits return the correct number of results
- MONGOID-4978 Do not raise an error when performing multi-batch queries with query cache enabled
- MONGOID-4853 Querying Date fields using a TimeWithZone instance queries by the date in local time zone
- MONGOID-4873 Do not break Regexp::Raw when Mongoid is loaded
- MONGOID-4952 Access embedded fields in projected query results
This patch replaces the 7.1.3 release, which was unsigned.
- Ruby
Published by egiurleo over 5 years ago
https://github.com/mongodb/mongoid - 7.0.10
This patch release in the Mongoid 7.0 series fixes the following bugs:
- MONGOID-4944 Ensure that cached queries with limits return the correct number of results
- MONGOID-4978 Do not raise an error when performing multi-batch queries with query cache enabled
- MONGOID-4853 Querying Date fields using a TimeWithZone instance queries by the date in local time zone
This patch replaces the 7.0.9 release, which was unsigned.
- Ruby
Published by egiurleo over 5 years ago
https://github.com/mongodb/mongoid - 6.4.7
This is a patch release in the Mongoid 6.4 series which introduces the following bug fixes in the query cache:
- MONGOID-4944 Ensure that cached queries with limits return the correct number of results
- MONGOID-4978 Do not raise an error when performing multi-batch queries with query cache enabled
This release replaces the 6.4.6 patch release, which was unsigned.
- Ruby
Published by egiurleo over 5 years ago
https://github.com/mongodb/mongoid - 6.4.5
This patch release in the 6.4 series provides improved compatibility with Ruby 2.7/3.0 by eliminating some of the deprecation warnings produced by Ruby 2.7.
- Ruby
Published by p-mongo over 5 years ago
https://github.com/mongodb/mongoid - 7.0.8
This patch release in the 7.0 series makes the following minor change:
The following issues have been fixed:
- MONGOID-4882 Embedded documents not setting parent association if declared with a class_name having "::" prefix
- MONGOID-4772 Model.client_name not usable due to private visibility unlike collection_name/database_name
- Ruby
Published by p-mongo over 5 years ago
https://github.com/mongodb/mongoid - 7.1.2
This patch release in the 7.1 series primarily addresses several query issues reported since the 7.1.1 release.
The following minor behavior change was made:
The following notable bugs were fixed:
- MONGOID-4880 Criteria for a field clobbered instead of combined when using symbol operators
- MONGOID-4882 Embedded documents not setting parent association if declared with a class_name having "::" prefix
- MONGOID-4884 not creates incorrect queries when symbol operators are given
- MONGOID-4887 Queryable Selector with .or and DateTime fails (NotImplementedError)
- MONGOID-4772 Model.client_name not usable due to private visibility unlike collection_name/database_name
- Ruby
Published by p-mongo over 5 years ago
https://github.com/mongodb/mongoid - 7.0.7
This patch release in the 7.0 series fixes one issue:
- Ruby
Published by p-mongo almost 6 years ago
https://github.com/mongodb/mongoid - 7.1.1
This patch release in the 7.1 series improves usability of and ease of migration to Mongoid 7.1.
Breaking change: Based on user feedback, the behavior of any_of was reverted to what it was in Mongoid 7.0, and also matches the behavior of or in Mongoid 7.0. or behaves the same in Mongoid 7.1.0 and 7.1.1. More details here.
Mongoid 7.1.1 also fixes the conflict with ActiveSupport delegation.
As of this release, Mongoid documentation includes a section listing major changes in 7.1 together with upgrading guidance. This should assist users looking to upgrade to Mongoid 7.1.
The following additional improvements were made:
- MONGOID-4841 Add eager loading for polymorphic belongs_to associations
- MONGOID-4804 Support argument-less where
The following notable bugs were additionally fixed:
- MONGOID-4870 $or condition is mishandled by Criteria#where
- MONGOID-4865 include_root_in_json setting retrieval does not respect hierarchy
- MONGOID-4874 Values seem to be lost when using add_to_set on a non-existent attribute on a loaded instance
- Ruby
Published by p-mongo almost 6 years ago
https://github.com/mongodb/mongoid - 7.0.6
This maintenance release in the 7.0.x series fixes the following issues:
- MONGOID-4658 Fix & integration test querying by TimeWithZone via driver
- MONGOID-4770 Mongoid does not automatically require driver ActiveSupport compatibility
- MONGOID-4718 Dynamic attribute readers/writers fail to define when attribute name has special chars
- MONGOID-4803 Criteria#not mutates receiver
- MONGOID-4832 Storing false values in fields of Array and Hash types fails but not in an expected way
- Ruby
Published by p-mongo almost 6 years ago
https://github.com/mongodb/mongoid - 7.1.0
Breaking change: the principal improvement in Mongoid 7.1 is the unified treatment of logical operations when building queries (i.e., operating on Criteria objects). This makes Mongoid's behavior match that of ActiveRecord, and results in consistent queries being constructed regardless of the mechanism used to construct them. Please carefully review the documentation here, specifically the section on operator combinations, and audit your application for uses of logical operations that changed behavior.
The following improvements have been made since 7.1.0.rc0:
The following changes have been made since 7.1.0.rc0:
- MONGOID-4830 Remove #one method from has_many associations (the #one method was added in 7.1.0.rc0, there should be no impact to applications using Mongoid 7.0 or previous versions)
The following bugs have been fixed:
- MONGOID-4832 Storing false values in fields of Array and Hash types fails but not in an expected way
As of version 7.1, Mongoid supports Ruby 2.3+ and JRuby 9.2. Support for Ruby 2.2 and JRuby 9.1 has been dropped.
- Ruby
Published by p-mongo almost 6 years ago
https://github.com/mongodb/mongoid - 7.1.0.rc0
This is a preview release of the next feature release of Mongoid - version 7.1.0.
The principal improvement in Mongoid 7.1 is the unified treatment of logical operations when building queries (i.e., operating on Criteria objects). This makes Mongoid's behavior match that of ActiveRecord, and results in consistent queries being constructed regardless of the mechanism used to construct them. The following tickets cover individual changes made:
- MONGOID-4697 Implement Arel-style "and", "or" and "not" combination of scopes
- MONGOID-4808 Require that Criteria strategies are explicitly requested, use $and behavior by default for all/in/nin
- MONGOID-4810 Require criteria methods be provided arguments
- MONGOID-4806 Produce the same query shapes with Criteria#where and Criteria#and
- MONGOID-4689 Mongoid::Criteria#find searches globally, does not restrict to criteria
- MONGOID-4813 not does not negate where with string argument
- MONGOID-4805 Criteria#not generates invalid queries when called with keyword arguments
Mongoid 7.1 also includes the following other query-related bug fixes:
- MONGOID-4460 Date.mongoize(String) should not convert string to local time first
- MONGOID-4673 Fix DateTime evolvement to UTC time
- MONGOID-4664 Consistently transform times for queries
- MONGOID-4769 embeds_many mishandles positional projections (foo.$)
- MONGOID-4672 Default order in
embeds_manyassociation causes association to use/return stale data - MONGOID-2681 Using #only with embedded documents sets omitted fields to default values
The following other assorted improvements and bug fixes have been made:
- MONGOID-4648 HABTM with foreign_key & primary_key set does not create reverse association
- MONGOID-4593 Model.set hash merge behavior does not match $set
- MONGOID-4652 Option to join multiple allow atomic persistence contexts into a single context
- MONGOID-4562 Accept integers for Mongoid::Config.log_level
- MONGOID-4797 Change default log destination to stderr
- MONGOID-4741 Include Mongoid::Timestamps in generated models by default
- MONGOID-4533 Deprecate Symbol field type
- Ruby
Published by p-mongo about 6 years ago
https://github.com/mongodb/mongoid - 5.4.1
This is a bug fix release in the Mongoid 5.x line addressing one issue:
- Ruby
Published by p-mongo over 6 years ago
https://github.com/mongodb/mongoid - 7.0.5
This maintenance release of the 7.0.x series primarily adds support for Rails 6.0. The following tickets have been resolved:
- MONGOID-4730 Support Rails 6.0
- MONGOID-4539 #create_with attrs should not be used in where query
- MONGOID-4754 Some regular expressions are missing beginning/end anchors or are using them incorrectly
- Ruby
Published by p-mongo over 6 years ago
https://github.com/mongodb/mongoid - 7.0.4
This maintenance release of the 7.0.x series primarily addresses a class loading regression introduced in the 7.0.3 release. The following tickets have been resolved:
- MONGOID-4749 belongs_to :name, class_name: '::SomeClass' raises an exception
- MONGOID-4750 Association definitions can trigger autoloading and cause NameError's
- MONGOID-4742 String#numeric? can return values other than true & false
- MONGOID-4743 String#numeric? incorrectly uses ^ and $ anchors and groups
- Ruby
Published by p-mongo over 6 years ago
https://github.com/mongodb/mongoid - 6.4.4
This maintenance release in the 6.4.x series contains the following notable improvements:
- MONGOID-4681 Replace BigDecimal.new with BigDecimal()
- MONGOID-4631 Log Mongoid runtime per Rails controller action
- MONGOID-4666 Allow Regexp fields to be set to nil
- MONGOID-4702 Add Symbol#within_box criterion for geo_spacial
The following bugs were aso fixed:
- MONGOID-4624 scoped text searches wipe all previous criteria
- MONGOID-4630 without_default_scope suppresses default scopes of other models
- MONGOID-4733 Document#as_json with :compact option returns nil if none of the fields are nil
6.4.3 release was skipped due to a certificate issue.
- Ruby
Published by p-mongo almost 7 years ago
https://github.com/mongodb/mongoid - 7.0.3
This maintenance release of the 7.0.x series has the following notable improvements:
- MONGOID-4728 Add Support for $eq operator in Matchable
- MONGOID-4729 Skip eager loading query if all keys are nil
- MONGOID-4524 Combine options when nesting PersistenceContexts on the same object
- MONGOID-4631 Log Mongoid runtime per Rails controller action
- MONGOID-4666 Allow Regexp fields to be set to nil
- MONGOID-4681 Replace BigDecimal.new with BigDecimal()
- MONGOID-4702 Add Symbol#within_box criterion for geo_spacial
The following notable issues have been fixed:
- MONGOID-4679 Can't clone documents with embeds_many and store_as on 7.0.x
- MONGOID-4598 In Mongoid 7.0.1 clone, dup method is not working with embeds_many -> embeds_many relations
- MONGOID-4733 Document#as_json with :compact option returns nil if none of the fields are nil
- MONGOID-4624 scoped text searches wipe all previous criteria
- MONGOID-4626 Querying unscoped associations ignores primary_key/foreign_key depending on association
- MONGOID-4630 without_default_scope suppresses default scopes of other models
- MONGOID-4645 belongs_to in namespaced children fails to detect a non-namespaced association
- MONGOID-4659 Query cache returns narrowed down results when a previous query used #first
- MONGOID-4521 QueryCache ignores getMore requests
- Ruby
Published by p-mongo almost 7 years ago
https://github.com/mongodb/mongoid - 6.4.2
This patch release has the following minor changes:
- MONGOID-4539 #create_with attrs should not be used in where query
- MONGOID-4578 Fix Settable: allow setting a nested value to a non-string
- MONGOID-4608 Add Nor matcher
- MONGOID-4612 Map reduce with preference test failure
- MONGOID-4576 drop_dups: mark deprecated
- Ruby
Published by saghm over 7 years ago
https://github.com/mongodb/mongoid - 7.0.2
This patch release has the following minor changes:
- MONGOID-4542 embedded_in with polymorphic and touch results in load_missing_constant
- MONGOID-4543 accepts_nested_attributes_for no longer sets autosave: true
- MONGOID-4544 Model#touch results in NoMethodError: undefined method `touch'
- MONGOID-4549 Dependents are tracked incorrectly through sibling documents
- MONGOID-4559 Setting an embeds_one to nil does not persist
- MONGOID-4560 Cloning documents with deep embedded documents don't work
- MONGOID-4608 Add Nor matcher
- MONGOID-4609 Fix Settable: allow setting a nested value to a non-string (on 7.x)
- MONGOID-4610 Mongoid::Clients::Factory test is failing with driver_master
- MONGOID-4612 Map reduce with preference test failure
- MONGOID-4532 Namespaced models in relations are not found
- MONGOID-4576 drop_dups: mark deprecated
- Ruby
Published by saghm over 7 years ago
https://github.com/mongodb/mongoid - 7.0.1
This patch release has the following minor changes:
- fix before_remove and after_remove relation callbacks and add shift relation method
- MONGOID-4536 Change session accessor name on a model to avoid name clash
- Ruby
Published by estolfo almost 8 years ago
https://github.com/mongodb/mongoid - 6.4.1
- MONGOID-4536 Internal API conflict with relation or attribute named 'session'
- MONGOID-4525 set modifier method don't persist change with a empty hash
- MONGOID-4526 Update mongoid.yml to point user to driver client documentation for options
- Ruby
Published by estolfo almost 8 years ago
https://github.com/mongodb/mongoid - 5.4.0
This minor release has the following changes:
- Drop support for MongoDB server version 2.4
- Require ruby driver version >= 2.5.1
- MONGOID-4499 Support $push + $each instead of $pushAll. (@TreyE)
- Ruby
Published by estolfo almost 8 years ago
https://github.com/mongodb/mongoid - 7.0.0
This major version of Mongoid has a number of significant refactors, bug fixes, and behavior corrections. Please refer to the list of changes in version 7.0.0.beta and the following list for a complete picture of the changes.
These are the behavior changes:
- Fixup the falsey logic of nested (@nolaneo)
- MONGOID-4477 Don't report destroyed count with unacknowledged writes
These are the bug fixes and API/feature additions:
- Drop support for MongoDB server version 2.4.0 / require at least server version 2.6.0.
- Require at least Ruby driver version 2.5.1
- remove warning: instance variable @__parent not initialized (@qbantek)
- MONGOID-4470 Add id_sort :none option to enumerable #first and #last
- MONGOID-4485 Remove Ruby 1.9 temporal fix removing Symbol:Size from Ruby's Symbol class (@ColinTheRobot)
- MONGOID-4487: Fix atomically to support empty updates (@gingerhendrix)
- Use old value of shar key when calculating
Mongoid::Shardableshard_key_selector(@intale) - Fix typo in documentation for And.rb (@kattak)
- add support for using $not in $elemMatch (@loganyu)
- Ensure the persistence context is unset when invalid (@benknowles)
- fix cloning document with polymorphic embedded documents with multiple language field (@tomasc)
- Add support for .inc to contextual (@johnnyshields)
- Travis test improvements (@johnnyshields)
- MONGOID-4497 Covert type to String before looking up in attributes hash.
- Remove QueryCache#read_or_server_selector (@koraktor)
- MONGOID-4505 Fix typo in tutorial for default_scope
- MONGOID-4499 Replace uses of pushAll with push and each
- MONGOID-3362 Don't allow Relations::Marcros methods to be field names
- MONGOID-4503 Support passing array_filters to update methods
- MONGOID-4483 Demongoize attribute values when accessing via #read_attribute or #[]
- MONGOID-2882 Set base relation on has_many enumerable objects
- MONGOID-4508 Ensure that fields are evolved properly when chaining criterion
- Fix Mongoid::Errors::UnknownModel (@Fudoshiki)
- MONGOID-4506 Support sessions
- fix query date parser with ActiveSupport timezone (@infernalmaster)
- Ruby
Published by estolfo almost 8 years ago
https://github.com/mongodb/mongoid - 7.0.0.beta
This is a beta release of Mongoid 7.0. It's is meant for testing and not for production. The API may also evolve as further betas and release candidates are released. Please report any issues in the jira project for Mongoid.
The release contains a large refactor of the way associations are defined between models. There are some behavior changes but the API is mostly unchanged. Please see the below list for details on bug fixes, behavior changes and API adjustments:
These are the behavior changes:
- MONGOID-4354 Provide more helpful error message when _type field doesn't correspond to a Class name
- MONGOID-4455 Make readonly attributes behavior consistent with ActiveRecord
- MONGOID-3831 Mongoize to a String when Range#mongoize receives a string instead of Range
- MONGOID-3678 Change #matches? to #_matches? to avoid relation name clash
These are the bug fixes and API/feature additions:
- Provide all dependent options that ActiveRecord has (documentation here)
- MONGOID-3261 Objects are built twice when relation is specified in the constructor.
- MONGOID-3586 Persistence inconsistency.
- MONGOID-3765
determine_inverse_foreign_keydoes not observe customized foreign key - MONGOID-3797 HABM relations are not saved correctly on both sides if providing just model_ids
- MONGOID-3809 Duplicate embedded document created on save (repro included)
- MONGOID-3829 Setting referenced-in relation breaks substitution of the inverse relation.
- MONGOID-3830 Range field type/extension seems to have a weird bug if given a string
- MONGOID-3850 Coexisting instances are able to bypass the uniqueness validator on embedded docs
- MONGOID-3876 delete_all conditions don't work with aliased fields.
- MONGOID-3893 Adding pointers in embedded document corrupts the pointed document
- MONGOID-3901 Create the dependent behavior restrict_with_error
- MONGOID-3917 Create child object with inheritance and nested attributes.
- MONGOID-4054 (Works as designed) Mongoid localized field not being set in first form submission
- MONGOID-4100 Ensure that type gets set for first_or methods on polymorphic objects
- MONGOID-4210 Embedded document unexpected autosave behavior
- MONGOID-4273 Self-referencing has_and_belongs_to_many not updated properly
- MONGOID-4282 Foreign key string are not properly evolved to ObjectIds in #where for polymorphic relations
- MONGOID-4309 Infinite Loop In Callbacks
- MONGOID-4427 Updating an embedded document triggers an unnecessary unset
- MONGOID-4435 Cloning Criteria does not preserve read preference
- MONGOID-4436 Duplicate of MONGOID-2882
- MONGOID-4442 Missing Mongoid::Relations::Cascading::DeleteAll
- MONGOID-4444 Field names display and options are on prohibited_methods list
- MONGOID-4258 Autosave does not cascade unless all items are "dirty"
- MONGOID-4259 "dependent: :destroy" option destroys out-of-date relation
- MONGOID-4431 Avoid using synced and syncable internally so as not to clash with potential attribute names
- MONGOID-4445 Remove unnecessary extra inverse criterion when retrieving has_many objects
- MONGOID-4447 Support passing a document to $unwind operator in aggregation
- MONGOID-4448 Add global config option to always create indexes in the background
- MONGOID-4449 Avoid using #base and #target method names on proxy objects
- MONGOID-4461 Encourage referring to MongoDB docs for supported map reduce options
- Ruby
Published by estolfo almost 8 years ago
https://github.com/mongodb/mongoid - 6.4.0
This version of Mongoid most notably adds support for sessions.
The full list of changes is as follows:
- Require at least version 2.5.1 of the Ruby driver
- MONGOID-4517 Implement sessions support
- MONGOID-4508 Chained "in" when querying on ids should evolve to ObjectId before the value comparison
- MONGOID-4477 Ensure that Model.destroy_all returns 0 for unacknowledged write concern
- Ruby
Published by estolfo almost 8 years ago
https://github.com/mongodb/mongoid - 6.3.0
This release of Mongoid depends on at least Ruby driver version 2.5.0, which supports MongoDB server version 3.6 and which drops supports for MongoDB server version 2.4. This requirement addresses MONGOID-4504.
In other words, this version of Mongoid supports MongoDB server versions 2.6 - 3.6.
The following bug fixes and changes are in this release:
- MONGOID-3362 Don't allow
associationsto be a Model field name, as it conflicts with the internal API. - MONGOID-4499 Use
$pushand$eachinstead of$pushAll - MONGOID-4470 Add id_sort :none option to enumerable #first and #last
- MONGOID-4497 Allow
_typeto be a Symbol or String. (@pacop) - MONGOID-4505 Fix typo in documentation.
- MONGOID-4503 Support passing array_filters to update methods.
- Ensure that Persistence Context is cleared, even when error is raised in accessing client. (@benknowles)
- Ruby
Published by estolfo about 8 years ago
https://github.com/mongodb/mongoid - 6.2.1
- MONGOID-4444 Don't include PersistenceContext methods in prohibted field names, include Clients::Options instead
- MONGOID-4466 Duplicate of MONGOID-4444
- MONGOID-4453 Ignore attr_readonly when defined on foreign key fields
- MONGOID-4445 Remove unnecessary extra inverse criterion when retrieving has_many objects
- MONGOID-4451 Unexpected exception when using a "destructive" field
- Make _destroy alias flagged_for_destroy? (@danielfarrell)
- Ruby
Published by estolfo over 8 years ago
https://github.com/mongodb/mongoid - 6.2.0
This version of Mongoid supports (and requires at least) Rails 5.1.
- MONGOID-4440 Support Rails 5.1
- Ruby
Published by estolfo over 8 years ago
https://github.com/mongodb/mongoid - 6.1.1
This patch release has the following changes:
- Update config template (@ivanovaleksey)
- MONGOID-3806 use where with delete conditions instead of driver API for #delete_all.
- Fix YARD doc for Criteria#merge method (@ivanovaleksey)
- Add support for matching index of an array (@loganyu)
- Refactor eager preload to avoid stack overflow (@val)
- Small improvement to spec for Touchable (@johnnyshields)
- MONGOID-4415 Ensure that storage options of parent are used for embedded docs when persisting
- MONGOID-4319 Don't replace relation if new one is identical to existing.
- Fix sort to id_sort option typos (@hartator)
- MONGOID-4416 Don't run touch callbacks when #touch is called on an object from a relation's callback
- MONGOID-4418 Don't allow PersistenceContext method as field names
- Fix compatibility of Mongoid::Contextual::None with other contexts by adding distinct (@ElMassimo)
- Update mongoid-queries.txt (@wndfly)
- Update mongoid-queries.txt with valid ruby (@arbourd)
- RUBY-1207 Note that username and password are required for most auth mechanisms.
- MONGOID-4426 Account for nil value in Hash field before setting
- Allow raw bson regexp query criteria on fields specified as Strings
- MONGOID-4425 #as_document continues to return BSON::Document, but use internal api method #as_attributes otherwise
- MONGOID-4431 Avoid use of certain names in Synchronization module so not to interfer with attribute names
- MONGOID-3678 Change #matches? to #_matches? to avoid relation name clash
- MONGOID-4435 Don't convert option keys to String from Symbols when cloning criteria
- Travis and Evergreen improvements
- API docs available at https://docs.mongodb.com/mongoid/6.1/api/
Tickets that are closed as of this release without changes:
- MONGOID-1963
- MONGOID-2515
- MONGOID-3090
- MONGOID-3602
- MONGOID-3616
- MONGOID-3657
- MONGOID-3658
- MONGOID-3666
- MONGOID-3715
- MONGOID-3742
- MONGOID-3759
- MONGOID-3775
- MONGOID-3840
- MONGOID-3869
- MONGOID-3872
- MONGOID-3886
- MONGOID-3912
- MONGOID-4054
- MONGOID-4099
- Ruby
Published by estolfo over 8 years ago
https://github.com/mongodb/mongoid - 5.2.1
This patch level release has the following changes:
- Add support for matching the index of an array (@loganyu)
- MONGOID-4428 Ensure that a BSON::Regexp::Raw object is serialized to a BSON regex when querying a field with type String. Also allow a BSON::Regexp::Raw object to be compiled to a native Ruby Regexp when querying in-memory documents. Please ensure that all uses of Ruby's Regexp class refer to it with the explicit syntax:
::Regexp.
- Ruby
Published by estolfo almost 9 years ago