---
title: "mongoid 9.0.0 Breaking Changes on RubyGems | Since.dev"
description: "What each mongoid release removed, renamed or changed: 125 breaking changes in 9 versions on RubyGems, each with its source."
canonical_url: https://since.dev/packages/gem/mongoid
last_updated: 2026-12-04
---

# mongoid breaking changes

mongoid 9.0.0 (May 1, 2024) is its newest release with breaking changes, 11 of them. The first: Support for Rails 2.6 and Rails 5 is dropped in mongoid 9.0.0. Every breaking API change we have recorded in mongoid on RubyGems: 125 breaking changes in 9 versions. Below, its 9 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `9.1.3`, released November 25, 2026. [Source repository](https://github.com/mongodb/mongoid)

Its 8.0.1 release requires Ruby 2.6 or later. [Ruby end of life dates](https://since.dev/calendar/ruby.md).

- From [8.0.1](#v-8-0-1) to [9.0.0](#v-9-0-0): 11 breaking changes in 1 version.
- From [3.0.0](#v-3-0-0) to [9.0.0](#v-9-0-0): 93 breaking changes in 8 versions.

## mongoid 9.0.0 breaking changes

mongoid 9.0.0, released May 1, 2024: 11 breaking changes.

- **Removed**  

Rails 2.6 and Rails 5 are no longer supported by this release. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Removed** `Mongoid.QueryCache`  

Mongoid::QueryCache, previously deprecated, is removed in this release. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Behavior changed**  

String values assigned to numeric fields are now converted to BigDecimal values. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Behavior changed**  

Hashes in an array assigned to a field are now always converted to BSON::Document, matching loaded data. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Behavior changed**  

Saving a model in a session other than the one that loaded it now logs a warning. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Behavior changed**  

Accessing a field excluded by the query projection now raises Mongoid::Errors::AttributeNotLoaded rather than ActiveModel::MissingAttributeError. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Behavior changed**  

Dates assigned to time-valued fields are now typecast using the app's configured time zone. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Behavior changed** `estimated_count`  

Calling estimated_count with a default scope active now raises Mongoid::Errors::InvalidEstimatedCountScoping. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Behavior changed** `touch`  

After touch, the model is no longer reported as changed, since the touch persisted it. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Default changed**  

Updating an embedded document now touches its parent by default. Set touch to false on the association if you do not want this. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)
- **Default changed** `Mongoid.around_embedded_document_callbacks`  

Around callbacks for embedded documents are now off by default. Enable them with the Mongoid.around_embedded_document_callbacks option if your code relies on them. [github.com](https://github.com/mongodb/mongoid/releases/tag/v9.0.0)

## mongoid 8.0.1 breaking changes

mongoid 8.0.1, released July 20, 2022: 13 breaking changes.

- **Removed**  

Deprecated constants are removed, so code referencing them must change. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Removed**  

Criteria and contextual caching is removed, so code relying on cached results must change. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Removed** `Document.to_a`  

Document#to_a is removed. Code calling it must be updated. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Removed** `drop_dup`  

The drop_dup option is removed from the index macro. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Removed** `geo_spacial`  

The deprecated geo_spacial method is removed. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Removed** `id_sort`  

The :id_sort option is removed; #first and #last now accept a limit argument instead. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Removed** `Mongoid.Errors.EagerLoad`  

The deprecated Mongoid::Errors::EagerLoad error class is removed. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Removed** `update_values`  

The update_values method is removed from the Hash and Array extensions. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Behavior changed**  

Declaring fields with undefined string or symbol types is now prohibited, so such declarations must be changed. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)
- **Behavior changed**  

The taken error message text now matches ActiveRecord and Rails I18n, so code matching the old message must change. [github.com](https://github.com/mongodb/mongoid/releases/tag/v8.0.1)

And 3 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## mongoid 7.0.0 breaking changes

mongoid 7.0.0, released March 12, 2018: 5 breaking changes.

- **Removed**  

Servers older than 2.6.0 are no longer supported. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0)
- **Removed** `QueryCache.read_or_server_selector`  

This method is gone; code calling it will fail. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0)
- **Behavior changed**  

Reading attributes with read_attribute or \[\] now returns demongoized values. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0)
- **Behavior changed**  

With unacknowledged writes the destroyed count is no longer reported. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0)
- **Configuration changed**  

The MongoDB Ruby driver must be at least version 2.5.1. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0)

## mongoid 7.0.0.beta breaking changes

mongoid 7.0.0.beta, released March 12, 2018: 4 breaking changes.

- **Renamed** `matches?`  

Calls to matches? must use \_matches? instead. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0.beta)
- **Behavior changed**  

Readonly attribute behavior was changed to match ActiveRecord. Review code that assigns readonly attributes. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0.beta)
- **Behavior changed**  

The error raised when a \_type field does not match a class name is reworded; code matching on the old message may break. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0.beta)
- **Behavior changed** `Range.mongoize`  

Range#mongoize mongoizes to a String when it receives a string rather than a Range. Check code that relied on the previous result. [github.com](https://github.com/mongodb/mongoid/releases/tag/v7.0.0.beta)

## mongoid 6.0.0.rc0 breaking changes

mongoid 6.0.0.rc0, released September 21, 2016: 2 breaking changes.

- **Behavior changed** `Criteria.map`  

Criteria#map uses pluck instead of only; code relying on the previous behavior may change. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.rc0)
- **Behavior changed** `only`  

only and without methods are not scoped to specific locales unless explicitly requested. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.rc0)

## mongoid 6.0.0.beta breaking changes

mongoid 6.0.0.beta, released September 21, 2016: 10 breaking changes.

- **Removed**  

Mongoid 6 requires Ruby greater than 2.2.2. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Removed** `run_targeted_callbacks`  

run_targeted_callbacks has been taken out of Mongoid. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Behavior changed**  

Field names are validated, so previously accepted invalid field names may now be rejected. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Behavior changed**  

Several behavior changes in Mongoid 6 apply to existing code, including belongs_to now being required by default and comparison operators returning false instead of raising. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Behavior changed** `Criteria.first`  

first and last now offer an option to include or exclude sort; existing calls may return different results. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Behavior changed** `Criteria.reorder`  

Calling reorder no longer mutates the original criteria object. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Behavior changed** `Date.mongoize`  

DateTime#mongoize and Date#mongoize return nil for invalid strings instead of previous behavior. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Behavior changed** `Model.with`  

Model#with now raises an exception when given invalid driver options. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Behavior changed** `Mongoid.Attributes.Dynamic`  

Cloning documents with unknown attributes no longer includes Mongoid::Attributes::Dynamic. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)
- **Default changed** `belongs_to`  

belongs_to relations are required by default; users must pass an option to override the requirement. [github.com](https://github.com/mongodb/mongoid/releases/tag/v6.0.0.beta)

## Older versions

3 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### mongoid 5.0.0 breaking changes

mongoid 5.0.0, released September 11, 2015: 9 breaking changes.

- **Removed**  

MongoDB 2.2 is no longer supported; use MongoDB 2.4 or higher. [github.com](https://github.com/mongodb/mongoid/blob/v5.0.0/CHANGELOG.md)
- **Removed** `Document.deleted?`  

The deleted? alias is gone; use destroyed? instead. [github.com](https://github.com/mongodb/mongoid/blob/v5.0.0/CHANGELOG.md)

And 7 more in this version.

### mongoid 4.0.0 breaking changes

mongoid 4.0.0, released June 23, 2014: 39 breaking changes.

- **Removed** `allow_dynamic_fields`  

Include Mongoid::Attributes::Dynamic in each model that needs dynamic fields. [github.com](https://github.com/mongodb/mongoid/blob/v4.0.0/CHANGELOG.md)
- **Removed** `attr_accessible`  

Use Strong parameters for mass assignment protection. [github.com](https://github.com/mongodb/mongoid/blob/v4.0.0/CHANGELOG.md)

And 37 more in this version.

### mongoid 3.0.0 breaking changes

mongoid 3.0.0, released July 8, 2012: 32 breaking changes.

- **Removed**  

Only has_one, has_many, has_and_belongs_to_many and belongs_to relation macros exist now. [github.com](https://github.com/mongodb/mongoid/blob/v3.0.0/CHANGELOG.md)
- **Removed** `autocreate_indexes`  

The autocreate_indexes configuration option has been removed and must no longer be set. [github.com](https://github.com/mongodb/mongoid/blob/v3.0.0/CHANGELOG.md)

And 30 more in this version.

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
