We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dd69219 + 98474c3 commit 06c4a3eCopy full SHA for 06c4a3e
docs/query-builder.txt
@@ -195,9 +195,10 @@ the value of the ``title`` field is ``"Back to the Future"``:
195
196
You can use the ``id`` alias in your queries to represent the
197
``_id`` field in MongoDB documents, as shown in the preceding
198
- code. When you run a find operation using the query builder, {+odm-short+}
199
- automatically converts between ``id`` and ``_id``. This provides better
200
- compatibility with Laravel, as the framework assumes that each record has a
+ code. When you use the query builder to run a find operation, the {+odm-short+}
+ automatically converts between ``_id`` and ``id`` field names. In query results,
+ the ``_id`` field is presented as ``id``. This provides better
201
+ consistency with Laravel, as the framework assumes that each record has a
202
primary key named ``id`` by default.
203
204
Because of this behavior, you cannot have two separate ``id`` and ``_id``
docs/upgrade.txt
@@ -115,9 +115,10 @@ This library version introduces the following breaking changes:
115
date classes, applying the default timezone.
116
117
- ``id`` is an alias for the ``_id`` field in MongoDB documents, and the library
118
- automatically converts between ``id`` and ``_id`` when querying data. Because
119
- of this behavior, you cannot have two separate ``id`` and ``_id`` fields in your
120
- documents.
+ automatically converts between ``id`` and ``_id`` when querying data. The query
+ result object includes an ``id`` field to represent the document's ``_id`` field.
+ Because of this behavior, you cannot have two separate ``id`` and ``_id`` fields
121
+ in your documents.
122
123
- Removes support for the ``$collection`` property. The following code shows
124
how to assign a MongoDB collection to a variable in your ``User`` class in
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments