1
1
***********
2
- Mongoid 7.5
2
+ Mongoid 8.0
3
3
***********
4
4
5
5
.. default-domain:: mongodb
@@ -10,7 +10,7 @@ Mongoid 7.5
10
10
:depth: 2
11
11
:class: singlecol
12
12
13
- This page describes significant changes and improvements in Mongoid 7.5 .
13
+ This page describes significant changes and improvements in Mongoid 8.0 .
14
14
The complete list of releases is available `on GitHub
15
15
<https://github.com/mongodb/mongoid/releases>`_ and `in JIRA
16
16
<https://jira.mongodb.org/projects/MONGOID?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page>`_;
@@ -22,7 +22,7 @@ Default Option Values Changed
22
22
-----------------------------
23
23
24
24
**Breaking change:** The following options have had their default values
25
- changed in Mongoid 7.5 :
25
+ changed in Mongoid 8.0 :
26
26
27
27
- ``:broken_aggregables`` => ``false``
28
28
- ``:broken_alias_handling`` => ``false``
@@ -42,13 +42,13 @@ the description and effects of each of these options.
42
42
Order of Callback Invocation
43
43
----------------------------
44
44
45
- **Breaking change:** Mongoid 7.5 changes the order of _create and _save callback
45
+ **Breaking change:** Mongoid 8.0 changes the order of _create and _save callback
46
46
invocation for documents with associations.
47
47
48
48
Referenced associations (``has_one`` and ``has_many``):
49
49
50
50
+---------------------------------------+---------------------------------------+
51
- | Mongoid 7.5 | Mongoid 7.4 |
51
+ | Mongoid 8.0 | Mongoid 7 |
52
52
+=======================================+=======================================+
53
53
| Parent :before_save | Parent :before_save |
54
54
+---------------------------------------+---------------------------------------+
@@ -94,7 +94,7 @@ Referenced associations (``has_one`` and ``has_many``):
94
94
Embedded associations (``embeds_one`` and ``embeds_many``):
95
95
96
96
+---------------------------------------+---------------------------------------+
97
- | Mongoid 7.5 | Mongoid 7.4 |
97
+ | Mongoid 8.0 | Mongoid 7 |
98
98
+=======================================+=======================================+
99
99
| Parent :before_save | Child :before_save |
100
100
+---------------------------------------+---------------------------------------+
@@ -150,7 +150,7 @@ conditions were provided, and the criteria already had an ``$or`` operator,
150
150
the new conditions would be added to the existing ``$or`` as an additional
151
151
branch.
152
152
153
- Mongoid 7.5 behavior:
153
+ Mongoid 8.0 behavior:
154
154
155
155
.. code-block:: ruby
156
156
@@ -172,7 +172,7 @@ Mongoid 7.5 behavior:
172
172
# class: Band
173
173
# embedded: false>
174
174
175
- Mongoid 7.4 behavior:
175
+ Mongoid 7 behavior:
176
176
177
177
.. code-block:: ruby
178
178
@@ -218,20 +218,20 @@ in ``after_*`` callbacks. This follows ActiveRecord/ActiveModel behavior.
218
218
a.age = 2
219
219
a.save!
220
220
221
- Mongoid 7.5 output:
221
+ Mongoid 8.0 output:
222
222
223
223
.. code-block:: ruby
224
224
225
225
#<Cat _id: 60aef1652c97a617438dc9bb, age: 2>
226
226
2
227
227
228
228
229
- Mongoid 7.4 output:
229
+ Mongoid 7 output:
230
230
231
231
.. code-block:: ruby
232
232
233
233
#<Cat _id: 60aef1652c97a617438dc9bb, age: 2>
234
234
nil
235
235
236
- Notice that in 7.4 ``attribute_was(:age)`` returns the old attribute value,
237
- while in 7.5 ``attribute_was(:age)`` returns the new value.
236
+ Notice that in 7 ``attribute_was(:age)`` returns the old attribute value,
237
+ while in 8.0 ``attribute_was(:age)`` returns the new value.
0 commit comments