File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -114,12 +114,19 @@ This library version introduces the following breaking changes:
114
114
- In query results, the library converts BSON ``UTCDateTime`` objects to ``Carbon``
115
115
date classes, applying the default timezone.
116
116
117
+ In v5.1, the library also performs this conversion to the ``Model::raw()``
118
+ method results before hydrating a Model instance.
119
+
117
120
- ``id`` is an alias for the ``_id`` field in MongoDB documents, and the library
118
121
automatically converts between ``id`` and ``_id`` when querying data. The query
119
122
result object includes an ``id`` field to represent the document's ``_id`` field.
120
123
Because of this behavior, you cannot have two separate ``id`` and ``_id`` fields
121
124
in your documents.
122
125
126
+ In v5.1, the library also performs this conversion to the ``Model::raw()``
127
+ method results before hydrating a Model instance. When passing a complex query
128
+ filter, use the ``DB::where()`` method instead of ``Model::raw()``.
129
+
123
130
- Removes support for the ``$collection`` property. The following code shows
124
131
how to assign a MongoDB collection to a variable in your ``User`` class in
125
132
older versions compared to v5.0:
You can’t perform that action at this time.
0 commit comments