Skip to content

7.0.0.beta

Compare
Choose a tag to compare
@estolfo estolfo released this 12 Mar 12:27
· 1219 commits to master since this release

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_key does 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