Skip to content

Commit 83e6525

Browse files
committed
utcdatetime
1 parent 8ea021f commit 83e6525

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/upgrade.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,18 @@ This library version introduces the following breaking changes:
114114
- In query results, the library converts BSON ``UTCDateTime`` objects to ``Carbon``
115115
date classes, applying the default timezone.
116116

117+
In v5.1, {+odm-short+} also performs this conversion to the ``Model::raw()``
118+
method results before hydrating a Model instance.
119+
117120
- ``id`` is an alias for the ``_id`` field in MongoDB documents, and the library
118121
automatically converts between ``id`` and ``_id`` when querying data. The query
119122
result object includes an ``id`` field to represent the document's ``_id`` field.
120123
Because of this behavior, you cannot have two separate ``id`` and ``_id`` fields
121124
in your documents.
122125

123-
In v5.1, {+odm-short+} also performs this conversion if you use the ``Model::raw()``
124-
method to hydrate a Model instance. When passing a complex query filter, use the
125-
``DB::where()`` method instead of ``Model::raw()``.
126+
In v5.1, {+odm-short+} 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()``.
126129

127130
- Removes support for the ``$collection`` property. The following code shows
128131
how to assign a MongoDB collection to a variable in your ``User`` class in

0 commit comments

Comments
 (0)