Changelog History
Page 8
-
v2.2.5 Changes
- ๐ This was a small patch release to address 2.2.x Heroku errors during asset compilation.
-
v2.2.4 Changes
#1377 Fix aggregation functions to properly handle nil or undefined values. (Maxime Garcia)
#1373 Warn if a scope overrides another scope.
#1372 Never persist when binding inside of a read attribute for validation.
๐ #1358 Fixed type error on many to many synchronization when inverse_of is set to nil.
#1356 $in criteria can now be chained to non-complex criteria on the same key without error.
๐ #1350, #1351 Fixed errors in the string conversions of double quotes and tilde when parameterizing keys.
#1349 Mongoid documents should not blow up when including Enumerable. (Jonas Nicklas)
-
v2.2.3 Changes
๐ #1295 Fixed having multiple includes only execute the eager loading of the first.
๐ #1225 Fixed delayed persistence of embedded documents via $set.
#1002 Fix BSON object id conversion to check if legal first.
-
v2.2.2 Changes
- ๐ This release removes the restriction of a dependency on 1.3.x of the mongo ruby driver. Users may now use 1.3.x through 1.4.x.
-
v2.2.1 Changes
Resolved Issues
#1210, #517 Allow embedded document relation queries to use dot notation. (Scott Ellard)
๐ #1198 Enumerable target should use criteria count if loaded has no docs.
#1164 Get rid of remaining no method in_memory errors.
#1070 Allow custom field serializers to have their own constructors.
๐ #1176 Allow access to parent documents from embedded docs in after_destroy callbacks.
#1191 Context group methods (min, max, sum) no longer return NaN but instead return nil if field doesn't exist or have values.
#1193, #1271 Always return Integers for integer fields with .000 precisions, not floats.
๐ #1199 Fixed performance issues of hash and array field access when reading multiple times.
๐ #1218 Fixed issues with relations referencing models with integer foreign keys.
๐ #1219 Fixed various conflicting modifications issues when pushing and pulling from the same embedded document in a single call.
๐ #1220 Metadata should not get overwritten by nil on binding.
๐ #1231 Renamed Mongoid's atomic set class to Sets to avoid conflicts with Ruby's native Set after document inclusion.
#1232 Fix access to related models during before_destroy callbacks when cascading.
๐ #1234 Fixed HABTM foreign key synchronization issues when destroying documents.
#1243 Polymorphic relations dont convert to object ids when querying if the ids are defined as strings.
#1247 Force Model.first to sort by ascending id to guarantee first document.
#1248 Added #unscoped to embedded many relations.
#1249 Destroy flags in nested attributes now actually destroy the document for has_many instead of just breaking the relation.
๐ง #1272 Don't modify configuration options in place when creating replica set connections.
-
v2.2.0 Changes
๐ New Features
Mongoid now contains eager loading in the form of
Criteria#includes(*args)
. This works on has_one, has_many, belongs_to associations and requires the identity map to be enabled in order to function. Setidentity_map_enabled: true
in yourmongoid.yml
. Ex:Person.where(title: "Sir").includes(:posts, :game)
Relations can now take a module as a value to the
:extend
option. (Roman Shterenzon)Capped collections can be created by passing the options to the
#store_in
macro:Person.store_in :people, capped: true, max: 1000000
Mongoid::Collection now supports
collection.find_and_modify
Document#has_attribute?
now aliases toDocument#attribute_present?
#930 You can now turn off the Mongoid logger via the mongoid.yml by doing
logger: false
๐ป #909 We now raise a
Mongoid::Errors::Callback
exception if persisting with a bang method and a callback returns false, instead of the uninformative validations error from before.
Major Changes
#1173 has_many relations no longer delete all documents on a set of the relation (= [ doc_one, doc_two ]) but look to the dependent option to determine what behavior should occur. :delete and :destroy will behave as before, :nullify and no option specified will both nullify the old documents without deleting.
#1142, #767 Embedded relations no longer immediately persist atomically when accessed via a parent attributes set. This includes nested attributes setting and
attributes=
orwrite_attributes
. The child changes then remain dirty and โก๏ธ atomically update when save is called on them or the parent document.
Resolved Issues
๐ #1190 Fixed the gemspec errors due to changing README and CHANGELOG to markdown.
#1180, #1084, #955 Mongoid now checks the field types rather than if the name contains
/id/
when trying to convert to object ids on criteria.#1176 Enumerable targets should always return the in memory documents first, when calling
#first
๐ #1175 Make sure both sides of many to many relations are in sync during a create.
#1172 Referenced enumerable relations now properly handle
#to_json
(Daniel Doubrovkine)๐ #1040 Increased performance of class load times by removing all delegate calls to self.class.
-
v2.1.9 Changes
Resolved Issues
๐ #1159 Fixed build blocks not to cancel out each other when nested.
#1154 Don't delete many-to-many documents on empty array set.
#1153 Retain parent document reference in after callbacks.
#1151 Fix associated validation infinite loop on self referencing documents.
0๏ธโฃ #1150 Validates associated on
belongs_to
isfalse
by default.๐ #1149 Fixed metadata setting on
belongs_to
relations.๐ #1145 Metadata inverse should return
nil
ifinverse_of
was set asnil
.#1139 Enumerable targets now quack like arrays.
#1136 Setting
belongs_to
parent tonil
no longer deletes the parent.#1120 Don't call
in_memory
on relations if they don't respond to it.0๏ธโฃ #1075 Set
self
in default procs to the document instance.#1072 Writing attributes for nested documents can take a hash or array of hashes.
#990 Embedded documents can use a single
embedded_in
with multiple parent definitions.
-
v2.1.8 Changes
Resolved Issues
๐ #1148 Fixed
respond_to?
on all relations to return properly.#1146 Added back the Mongoid destructive fields check when defining fields.
๐ #1141 Fixed conversions of
nil
values in criteria.#1131 Verified Mongoid/Kaminari paginating correctly.
โก๏ธ #1105 Fixed atomic update consumer to be scoped to class.
0๏ธโฃ #1075
self
in default lambdas and procs now references the document instance.#740 Removed
embedded_object_id
configuration parameter.๐ #661 Fixed metadata caching on embedded documents.
๐ #595 Fixed relation reload flagging.
#410 Moving documents from one relation to another now works as expected.
-
v2.1.7 Changes
๐ This was a specific release to fix MRI 1.8.7 breakages introduced by 2.1.6.
-
v2.1.6 Changes
Resolved Issues
#1126 Fix setting of relations with other relation proxies.
#1122 Hash and array fields now properly flag as dirty on access and change.
๐ #656 Fixed reload breaking relations on unsetting of already loaded associations.
๐ #647 Prefer
#unset
to#remove_attribute
for removing values.#290 Verify pushes into deeply embedded documents.