Skip to content

Commit ca219dc

Browse files
committed
small fixes - MW
1 parent 348870b commit ca219dc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

source/interact-data/specify-query.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,10 @@ with the specified ``_id`` field value:
558558

559559
.. note:: Type Conversion
560560

561-
The ``find()`` method converts the ID that you pass to the
562-
data type declared for the ``_id`` field in the model. By
563-
default, the ``_id`` field is defined as a ``BSON::ObjectId`` type.
561+
When you pass an ID value to the ``find()`` method, the method
562+
converts it to the data type declared for the ``_id`` field in the
563+
model. By default, the ``_id`` field is defined as a
564+
``BSON::ObjectId`` type.
564565

565566
The preceding example is equivalent to the following code, which
566567
passes an ``BSON::ObjectId`` instance as the argument to ``find()``:
@@ -640,8 +641,8 @@ method:
640641

641642
You can use the ``find_or_initialize_by()`` method to retrieve documents
642643
based on the provided criteria. If no documents are found, it returns a
643-
new one, without persisting it to MongoDB. The syntax for
644-
``find_or_initialize_by()`` is the same for the ``find_or_create_by()``
644+
new one, without persisting it to MongoDB. Use the same syntax for
645+
``find_or_initialize_by()`` as you do for the ``find_or_create_by()``
645646
method.
646647

647648
Regular Expressions
@@ -785,7 +786,7 @@ result from the list of returned documents based on its position.
785786
following code for an example.*
786787

787788
- ``first_or_create()``: Returns the first matching document. If no
788-
document matches, creates and returns a newly persisted one.
789+
document matches, creates and returns a newly saved one.
789790

790791
- ``first_or_initialize()``: Returns the first matching document. If no
791792
document matches, returns a new one.

0 commit comments

Comments
 (0)