The following maintenance releases for the Mongoid ODM are now available: 9.0.5, 8.1.9, and 8.0.9. These incorporate bug fixes for the 9.0, 8.1, and 8.0 series, respectively.
These bug fixes include:
- MONGOID-5836 - Callbacks were being duplicated on deeply embedded children.
- MONGOID-5839 - When using single-collection inheritance, eager loading (with
#includes
) was not producing the correct query when the root of the query was the document subclass. - MONGOID-5825 - The
Mongoid::Timestamps
module would (in certain cases) attempt to timestamp deleted documents, which resulted in aFrozenError
being raised. - MONGOID-5822 - Perform validations on embedded documents even if the embedded documents have not changed.
Additionally, the 8.0.9 release also includes:
- MONGOID-5757 - Child validations were being short-circuited, resulting in subsequent validation callbacks not being called after the first failing validation.
- MONGOID-5797 - Accessing the parent document from an embedded document was failing with an error when the original query applied a projection.
- MONGOID-5810 - When
Mongoid.legacy_attributes
istrue
, the#as_document
method was returning a hash that leaked internal model state. The hash is now deep-duplicated before being returned (which may have performance implications for large documents or complex hashes).