Skip to content

Releases: mongodb/mongoid

9.0.8

18 Sep 20:07
57a3fc4
Compare
Choose a tag to compare

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)

9.0.7

24 Jul 16:36
50a3b72
Compare
Choose a tag to compare

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

8.1.11

24 Jul 17:31
450a5c0
Compare
Choose a tag to compare

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

8.0.11

24 Jul 17:34
a6ef2dc
Compare
Choose a tag to compare

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

9.0.6

24 Feb 20:25
6b07b84
Compare
Choose a tag to compare

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_many association 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: v9.0.5...v9.0.6

8.1.10

24 Feb 20:26
567c2fe
Compare
Choose a tag to compare

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_many association 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: v8.1.9...v8.1.10

8.0.10

24 Feb 20:27
77afdc9
Compare
Choose a tag to compare

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_many association 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: v8.0.9...v8.0.10

9.0.5

30 Jan 20:02
45e670f
Compare
Choose a tag to compare

Version 9.0.5 of the Mongoid ODM for MongoDB is now available.

Release Highlights

  • MONGOID-5836 - Callbacks were being duplicated on deeply embedded children.
  • MONGOID-5839 - When using single-collection inheritance, eager loading (with #includes) was not producing the correct query when the root of the query was the document subclass.
  • MONGOID-5825 - The Mongoid::Timestamps module would (in certain cases) attempt to timestamp deleted documents, which resulted in a FrozenError being raised.
  • MONGOID-5822 - Perform validations on embedded documents even if the embedded documents have not changed.

Documentation

Documentation is available at MongoDB.com.

Installation

You may install this version via RubyGems, with:

gem install --version 9.0.5 mongoid

Full Changelog: v9.0.4...v9.0.5

8.1.9

30 Jan 20:00
9772be1
Compare
Choose a tag to compare

Version 8.1.9 of the Mongoid ODM for MongoDB is now available.

Release Highlights

  • MONGOID-5836 - Callbacks were being duplicated on deeply embedded children.
  • MONGOID-5839 - When using single-collection inheritance, eager loading (with #includes) was not producing the correct query when the root of the query was the document subclass.
  • MONGOID-5825 - The Mongoid::Timestamps module would (in certain cases) attempt to timestamp deleted documents, which resulted in a FrozenError being raised.
  • MONGOID-5822 - Perform validations on embedded documents even if the embedded documents have not changed.

Documentation

Documentation is available at MongoDB.com.

Installation

You may install this version via RubyGems, with:

gem install --version 8.1.9 mongoid

Full Changelog: v8.1.8...v8.1.9

8.0.9

29 Jan 17:58
f49d011
Compare
Choose a tag to compare

Version 8.0.9 of the Mongoid ODM for MongoDB is now available.

Release Highlights

  • MONGOID-5836 - Callbacks were being duplicated on deeply embedded children. A related issue (MONGOID-5542) was also backported to 8.0, exposing the Mongoid.prevent_multiple_calls_of_embedded_callbacks setting to preserve backwards compatibility in most cases (defaults to false).
  • MONGOID-5757 - Child validations were being short-circuited, resulting in subsequent validation callbacks not being called after the first failing validation.
  • MONGOID-5797 - Accessing the parent document from an embedded document was failing with an error when the original query applied a projection.
  • MONGOID-5810 - When Mongoid.legacy_attributes is true, the #as_document method was returning a hash that leaked internal model state. The hash is now deep-duplicated before being returned (which may have performance implications for large documents or complex hashes).
  • MONGOID-5839 - When using single-collection inheritance, eager loading (with #includes) was not producing the correct query when the root of the query was the document subclass.
  • MONGOID-5825 - The Mongoid::Timestamps module would (in certain cases) attempt to timestamp deleted documents, which resulted in a FrozenError being raised.

Documentation

Documentation is available at MongoDB.com.

Installation

You may install this version via RubyGems, with:

gem install --version 8.0.9 mongoid

Full Changelog: v8.0.8...v8.0.9