Skip to content

Commit 33d71c2

Browse files
committed
JT feedback 2
1 parent 1664cfe commit 33d71c2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/includes/query-builder/QueryBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testOrWhere(): void
6363
{
6464
// begin query orWhere
6565
$result = DB::connection('mongodb')
66-
->collection('movies')
66+
->table('movies')
6767
->where('id', new ObjectId('573a1398f29313caabce9682'))
6868
->orWhere('title', 'Back to the Future')
6969
->get();

docs/query-builder.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,12 @@ the value of the ``title`` field is ``"Back to the Future"``:
191191
You can use the ``id`` alias in your queries to represent the
192192
``_id`` field in MongoDB documents, as shown in the preceding
193193
code. When you run a find operation using the query builder, {+odm-short+}
194-
automatically converts between ``id`` and ``_id``. Because of this behavior,
195-
you cannot have two separate ``id`` and ``_id`` fields in your documents.
194+
automatically converts between ``id`` and ``_id``. This provides better
195+
compatibility with Laravel, as the framework assumes that each record has a
196+
primary key named ``id`` by default.
197+
198+
Because of this behavior, you cannot have two separate ``id`` and ``_id``
199+
fields in your documents.
196200

197201
.. _laravel-query-builder-logical-and:
198202

0 commit comments

Comments
 (0)