Mongoid v3.0.10 Release Notes

  • Resolved Issues

    • #2507 Ensure no extra db hits when eager loading has a mix of parents with and without docs. (Douwe Maan)

    • ⚡️ #2505 Ensure update and update_all from criteria properly handle aliased fields. (Dmitry Krasnoukhov)

    • #2504 Model#becomes properly keeps the same id.

    • #2498 Criteria now properly pass provided blocks though method_missing.

    • #2496 Embedded documents that were previously stored without ids now properly update and get assigned ids from within Mongoid.

    • #2494 All explicit atomic operations now properly respect aliased fields.

    • #2493 Use Class#name instead of Class#model_name when setting polymorphic types in case model_name has been overridden.

    • 🔀 #2491 Removed unnecessary merge call in cascadable children.

    • #2485 Removing indexes now always uses strong consistency.

    • #2483 Versioning now handles localized fields. (Lawrence Curtis)

    • #2482 Store find parameters in the DocumentNotFound error.

    • #2481 Map/reduce aggregations now properly handle Mongo's batching of reduce jobs in groups of 100 with the state being passed through on the count.

    • #2476 Handle skip and limit outside of range on embeds_many relations gracefully.

    • #2474 Correctly detach 1-1 relations when the child is not yet loaded. (Kostyantyn Stepanyuk)

    • #2451 relation.deleted on embedded paranoid documents now works properly again.

    • ⚡️ #2472 Ensure update_all on embedded relations works properly when nothing is actually going to be updated.

    • #2469 Nullified documents on relations are now able to be re-added with the same in memory instance.

    • #2454 Model#as_document properly allows changes from having a relation to the relation being removed. (James Almond)

    • 👍 #2445 Mongoid middleware now properly supports both normal and streamed responses and properly clears the identity map for either.

    • #2367 Embedded documents that are to be deleted via nested attributes no longer become immediately removed from the relation in case the parent validation fails. Instead, they get flagged for destruction and then the removal occurs upon the parent passing validation and going to persist.

    Note this is a behavior change, but since the API does not change and the previous behavior was incorrect and did not match AR this was able to go into a point release.