From 44af6bca7981951602327eeeacbfe6e19bd49571 Mon Sep 17 00:00:00 2001 From: norareidy Date: Fri, 11 Oct 2024 11:26:37 -0400 Subject: [PATCH 1/2] DOCSP-44158: Convert arrow to dot notation --- docs/query-builder.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/query-builder.txt b/docs/query-builder.txt index 2bb6f75f2..5c6a0fa06 100644 --- a/docs/query-builder.txt +++ b/docs/query-builder.txt @@ -221,6 +221,13 @@ value greater than ``8.5`` and a ``year`` value of less than :start-after: begin query andWhere :end-before: end query andWhere +.. tip:: + + In v5.1, you can use the arrow (``->``) or dot (``.``) notation + to access nested fields in a query filter. The preceding example + uses the dot notation to query the ``imdb.rating`` nested field, but + ``imdb->rating`` achieves the same result. + .. _laravel-query-builder-logical-not: Logical NOT Example From 46d324ddc3702752894b94a1cda8c2710e376213 Mon Sep 17 00:00:00 2001 From: norareidy Date: Fri, 11 Oct 2024 13:40:38 -0400 Subject: [PATCH 2/2] JT + JS feedback --- docs/query-builder.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/query-builder.txt b/docs/query-builder.txt index 5c6a0fa06..cac12a368 100644 --- a/docs/query-builder.txt +++ b/docs/query-builder.txt @@ -223,10 +223,10 @@ value greater than ``8.5`` and a ``year`` value of less than .. tip:: - In v5.1, you can use the arrow (``->``) or dot (``.``) notation - to access nested fields in a query filter. The preceding example - uses the dot notation to query the ``imdb.rating`` nested field, but - ``imdb->rating`` achieves the same result. + For compatibility with Laravel, Laravel MongoDB v5.1 supports both arrow + (``->``) and dot (``.``) notation to access nested fields in a query + filter. The preceding example uses dot notation to query the ``imdb.rating`` + nested field, which is the recommended syntax. .. _laravel-query-builder-logical-not: