Releases: mongodb/mongoid
8.0.5
Mongoid 8.0.5 is a patch release in the 8.0 series with one bug fix:
8.1.0
Mongoid 8.1.0 is a feature release in 8.x series with the following significant new functionality:
- MONGOID-5370 API for creating time series collections
- MONGOID-4528 Support for 'saved_change_to_attribute', 'attribute_before_last_save' and 'will_save_change_to_attribute'
- MONGOID-5293 Add Rails-style defaults &
config.load_defaults.
- MONGOID-5445 Concurrent query execution
- MONGOID-5596 Deprecate Mongoid::QueryCache in favor of Mongo::QueryCache
The following issues were fixed:
- MONGOID-5542 Prevention of double calls in callbacks
- MONGOID-5600 Mongoid 8 breaks "build"
- MONGOID-5520 Criteria ordering fails for non-numeric values (ex: { '$meta' => 'textScore' })
- MONGOID-5582 Support shard keys based on subdocument fields
- MONGOID-5474 Raise Mongoid::Errors::ReadonlyDocument when saving readonly documents
- MONGOID-5417 Memory leak when using with()
- MONGOID-5539 Find requires Pipeline aggregation to be coerced into an array
- MONGOID-5547 rake db:mongoid:create_indexes fails for models that are stored outside of /app/models.
- MONGOID-3834 unable to access parent when setting child attribute
- MONGOID-5441 Thread.current[:session] is not prefixed
- MONGOID-5436 legacy_triple_equals used incorrectly
The following additional improvements were made:
- MONGOID-5465 Single-value .in should convert to .where (resolve deprecated .in scalar value behavior)
- MONGOID-5620 delete_one on embeds_many is callable and is not consistent with delete
- MONGOID-5617 Improve performance of _matches?()
- MONGOID-5595 Forward explain options to driver
- MONGOID-5590 Shard keys do not support fields with "." in their name
- MONGOID-5509 Deprecate feature flags which were introduced in Mongoid 7.x
- MONGOID-5226 Allow setting "store_in collection" on document subclass
- MONGOID-4698 Warn about attempts to define text_search scope (and others?)
- MONGOID-5458 Document fallbacks option on localized fields
- MONGOID-4403 Support Dirty Tracking changed from /to
- MONGOID-5438 Implement local override for i18n parameters
- MONGOID-5437 Extract fallback enabling logic into macro
- MONGOID-5334 Review mongoization/demongoization/evolution behavior for localized fields
- MONGOID-5490 Deprecate and remove use_activesupport_time_zone (should always be true)
- MONGOID-5228 Allow _ids to be modified in embedded documents
- MONGOID-5453 Add .none_of query method
- MONGOID-5363 Change #upsert to perform updating upsert rather than replacing upsert
- MONGOID-5281 Respect aliases in embedded documents when querying
- MONGOID-5100 ActiveRecord parity: allow selector arguments for .exists?
- MONGOID-5264 Add some way to strip out blank localized values before saving model
- MONGOID-5422 Mongoid.configure should allow arg-less block
- MONGOID-4979 Add :touch option to model save method
- MONGOID-5418 AR Feature Parity first!/last!/second etc.
8.0.4
Mongoid 8.0.4 is a patch release in 8.0 series with a few bug fixes:
- MONGOID-5520 Criteria ordering fails for non-numeric values (ex: { '$meta' => 'textScore' })
- MONGOID-5539 Find requires Pipeline aggregation to be coerced into an array
- MONGOID-5582 Support shard keys based on subdocument fields
- MONGOID-5600 Mongoid 8 breaks "build"
The following additional improvements were made:
- MONGOID-5465 Single-value .in should convert to .where (resolve deprecated .in scalar value behavior)
- MONGOID-5590 Shard keys do not support fields with "." in their name
- MONGOID-5560 delete_one on embeds_many is callable and is not consistent with delete
- MONGOID-5617 Improve performance of _matches?()
7.5.3
Mongoid 7.5.3 is a patch release in 7.5 series with a few bug fixes:
- MONGOID-5546 First/Last failures when empty hash passed as criteria
- MONGOID-5582 Support shard keys based on subdocument fields
- MONGOID-5352 Fix assign_attributes on replacing embeds_many
The following additional improvements were made:
8.0.3
This patch release in the 8.0 series fixes the following issues:
- MONGOID-5417 Memory leak when using with()
- MONGOID-5456 New "uncastable" behavior does't work with ActiveSupport::Duration
- MONGOID-5441 Thread.current[:session] is not prefixed
The the following minor improvement were added:
- MONGOID-4698 Warn about attempts to define text_search scope (and others?)
- MONGOID-5334 Review mongoization/demongoization/evolution behavior for localized fields
- MONGOID-5433 Rails 7 deprecates Time#to_s(format) and replaces it with Time#to_fs(format)
- MONGOID-5437 Extract fallback enabling logic into macro
7.5.2
This patch release in the 7.5 series adds the following minor improvements and bug fixes:
- MONGOID-5255 Do not allow reuse of a closed client
- MONGOID-5417 Fix memory leak when call 'with'
- MONGOID-5452 Add legacy_attributes to 7.5
- MONGOID-5433 Replace calls of Time#to_s(format) with Time#to_formatted_s
8.0.2
This patch release in the 8.0 series adds the following minor improvement:
The following issues have been fixed:
- MONGOID-5435 ArgumentError when scope block has positional and keyword arguments
- MONGOID-5436 legacy_triple_equals used incorrectly
Also read the full Mongoid 8.0 release notes.
7.5.1
This patch release in the 7.4 series fixes the following issues:
7.4.3
This patch release in the 7.4 series fixes the following issue:
8.0.1
Mongoid 8.0 is a feature release with the following significant new functionality:
- MONGOID-4627 Callback behavior during persistence operations fixed
- MONGOID-4641 Ability to store BigDecimal fields as decimal128 in the database
- MONGOID-5332 Consistent mongoization, demongoization and evolution of unconvertable values
- MONGOID-5428 Ability to set driver options in mongoid.yml
- MONGOID-5365 Change #attributes return value to Hash with a flag
The following additional improvements were made:
- MONGOID-4547 Implement #take / #take! for AR feature parity
- MONGOID-5270 Implement .tally method for Mongoid#Criteria
- MONGOID-4998 Support limit argument in #first and #last, :id_sort option removed
- MONGOID-5351 Implement Dots and Dollars in Mongoid
- MONGOID-5098 Mongoize Range endpoints + support begin-less/end-less ranges
- MONGOID-5003 Delegate Model#find with block argument to Enumerable#find
- MONGOID-5180 Rails parity: Add #pick method (equivalent to pluck.first)
- MONGOID-5315 Accept formatted strings in Date/Time/DateTime.demongoize
- MONGOID-5217 Add attribute_previously_was helpers
- MONGOID-5390 #pluck in memory should return nil values (non-compacted)
- MONGOID-5402 In-memory pluck, distinct should support dot-notation for field path traversal
- MONGOID-5404 Populate attributes_before_type_cast on read from database
- MONGOID-3267 Allow associations to be used inside defaults
- MONGOID-4500 Mongoid::Contextual::Aggregable::Memory should ignore nil and non-numeric values
The following minor improvements were made:
- MONGOID-5376 Use exists? or any? instead of count to determine existence of any document
- MONGOID-5306 Use pluck instead of only to avoid projecting when referencing association _ids
- MONGOID-5353 Change "taken" error message text to match ActiveRecord / Rails I18n
- MONGOID-5327 Prohibit using undefined string/symbol types when declaring fields
The following functionality was deprecated:
The following functionality was removed:
- MONGOID-5414 Remove criteria/contextual caching
- MONGOID-4686 Remove Document#to_a
- MONGOID-5302 Remove update_values method from Hash and Array extensions
- MONGOID-5323 Remove deprecated Mongoid::Errors::EagerLoad
- MONGOID-5341 Remove drop_dup options from index macro
- MONGOID-5322 Remove deprecated geo_spacial method
- MONGOID-5324 Remove deprecated constants
- MONGOID-5426 Remove pluck behavior from map
The following issues were fixed:
- MONGOID-5089 Incorrect foreign key value set in has_many target when an orphan child is associated with parent via its id
- MONGOID-5104 attribute_was returns previous value in after_save callback
- MONGOID-2306 cascade_callbacks not working using before_create and <<
- MONGOID-3601 Don't mark embedded objects as persisted when the parent is invalid
- MONGOID-4160 Don't persist document if associated document is invalid with optional: false
- MONGOID-4397 update_attributes does not reflect changes to embedded documents in the attributes hash
- MONGOID-4476 Writes in callbacks of nested embedded documents are not persisted when top-level document is modified via update_attributes
- MONGOID-4520 Set inverse keys on HABTM relationship when subsequently persisting document
- MONGOID-4646 has_one - belongs_to with optional:true incorrectly clears association when assigned itself
- MONGOID-4843 don't populate .changed_attributes setting has_and_belongs_to_many association
- MONGOID-4911 Range expansion must use $elemMatch to ensure both $gte and $lte match the same array element
- MONGOID-5034 When excluded from query, embeds many relations are returned as empty array instead of raising MissingAttributeError
- MONGOID-5037 destroy_all with conditions argument constrains the embedded documents being destroyed with their full attribute tree
- MONGOID-5039 Multiple polymorphic embeds cause wrong association to be assigned
- MONGOID-5043 'where' query incorrectly works for belongs_to relations with custom primary_key
- MONGOID-5078 Background jobs queued during after_save, which atomically query sharded documents, fail because of atomic_selector.
- MONGOID-5079 clear has_many association locally after destroy_all
- MONGOID-5110 Parent ID missing in after_destroy callback when removing via nested attribute
- MONGOID-5172 Criteria#any_of with multiple arguments incorrectly adds conditions to existing top-level $or if one is already present
- MONGOID-5190 Respect persistence options on auto-saved associations
- MONGOID-2586 cannot access parent object in the after_find function
- MONGOID-3291 Clear inverse associations when setting across all association types
- MONGOID-4316 Eager loading loads unnecessary documents when multiple associations reference the same model class
- MONGOID-4514 Counter cache not decremented when nullifying relation/association
- MONGOID-4705 Inverse association not populated for HABTM when using class_name
- MONGOID-4716 Fix eager loading of nested referenced associations
- MONGOID-4811 Output controller runtime stats in milliseconds as per Rails requirements
- MONGOID-4823 Values for BSON::Binary fields are not converted to Binary
- MONGOID-4838 safely use #clone method on embedded children with fields changed/removed
- MONGOID-4869 Setting an embeds_many association to empty array does not persist it when a document is created
- MONGOID-5255 Unexpected client close with Runtime Persistence
- MONGOID-5269 Persist writing an attribute after a removal correctly
- MONGOID-5280 Mongoid 7.4 inserts only one embedded document when multiple documents are created with nil _id
- MONGOID-5344 Using concat on has_and_belongs_to_many ids default value is not working the first time
- MONGOID-5352 Fix assign_attributes on replacing embeds_many
- MONGOID-5379 The use runtime persistence raises an error for updates
- MONGOID-5380 Assignment of embedded association doesn't work when used before another association assignment
- MONGOID-5416 Mongoid::Contextual#last modifies the sort on the view
Mongoid 8 requires MongoDB 3.6 or newer, Ruby 2.6 or newer, JRuby 9.3 or newer, ActiveSupport 5.2 or newer. Older versions of these libraries and environments are not supported.
Mongoid 8.0.1 is the first release in the 8.0 series. The 8.0.0 release was yanked due to incorrect gem dependency on a pre-release driver version.