Skip to content

Commit a5e1f0c

Browse files
MONGOID-5192 Rails compatible callbacks order for embedded relations (#5090)
1 parent 68f736b commit a5e1f0c

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

source/release-notes/mongoid-7.5.txt

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,52 @@ Referenced associations (``has_one`` and ``has_many``):
6868
| Parent :around_save_close | |
6969
+---------------------------------------+---------------------------------------+
7070
| Parent :after_save | |
71-
+---------------------------------------+---------------------------------------+
71+
+---------------------------------------+---------------------------------------+
72+
73+
Embedded associations (``embeds_one`` and ``embeds_many``):
74+
75+
+---------------------------------------+---------------------------------------+
76+
| Mongoid 7.5 | Mongoid 7.4 |
77+
+=======================================+=======================================+
78+
| Parent :before_save | Child :before_save |
79+
+---------------------------------------+---------------------------------------+
80+
| Parent :around_save_open | Child :around_save_open |
81+
+---------------------------------------+---------------------------------------+
82+
| Parent :before_create | Child :around_save_close |
83+
+---------------------------------------+---------------------------------------+
84+
| Parent :around_create_open | Child :after_save |
85+
+---------------------------------------+---------------------------------------+
86+
| Child :before_save | Parent :before_save |
87+
+---------------------------------------+---------------------------------------+
88+
| Child :around_save_open | Parent :around_save_open |
89+
+---------------------------------------+---------------------------------------+
90+
| Child :before_create | Child :before_create |
91+
+---------------------------------------+---------------------------------------+
92+
| Child :around_create_open | Child :around_create_open |
93+
+---------------------------------------+---------------------------------------+
94+
| | Child :around_create_close |
95+
+---------------------------------------+---------------------------------------+
96+
| | Child :after_create |
97+
+---------------------------------------+---------------------------------------+
98+
| | Parent :before_create |
99+
+---------------------------------------+---------------------------------------+
100+
| | Parent :around_create_open |
101+
+---------------------------------------+---------------------------------------+
102+
| **Document persisted in MongoDB** | **Document persisted in MongoDB** |
103+
+---------------------------------------+---------------------------------------+
104+
| Child :around_create_close | |
105+
+---------------------------------------+---------------------------------------+
106+
| Child :after_create | |
107+
+---------------------------------------+---------------------------------------+
108+
| Child :around_save_close | |
109+
+---------------------------------------+---------------------------------------+
110+
| Child :after_save | |
111+
+---------------------------------------+---------------------------------------+
112+
| Parent :around_create_close | Parent :around_create_close |
113+
+---------------------------------------+---------------------------------------+
114+
| Parent :after_create | Parent :after_create |
115+
+---------------------------------------+---------------------------------------+
116+
| Parent :around_save_close | Parent :around_save_close |
117+
+---------------------------------------+---------------------------------------+
118+
| Parent :after_save | Parent :after_save |
119+
+---------------------------------------+---------------------------------------+

0 commit comments

Comments
 (0)