-
Notifications
You must be signed in to change notification settings - Fork 29
DOCSP-44821: specify a query pt 2 #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCSP-44821: specify a query pt 2 #61
Conversation
✅ Deploy Preview for docs-mongoid ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…OCSP-44821-specify-query-2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. Lots of small suggested changes, but nothing major.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A couple small comments to consider
The ``find()`` method converts the ID that you pass to the | ||
data type declared for the ``_id`` field in the model. By |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about this?
The ``find()`` method converts the ID that you pass to the | |
data type declared for the ``_id`` field in the model. By | |
When you pass an ID to the ``find()`` method, the method converts it | |
to the data type declared for the ``_id`` field in the model. By |
The ``find()`` method performs the type conversion of the argument that | ||
you pass to the type declared for the ``_id`` field in the model. By | ||
default, the ``_id`` field is defined as a ``BSON::ObjectId`` type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was still a little confusing because my brain wants to read "pass to" as a verbal phrase instead of verb + preposition, if that makes sense. What about:
"When you pass an ID to the find()
method, it converts the ID to the data type..."
|
||
You can use the ``find_or_create_by()`` method to retrieve documents | ||
based on the provided criteria. If no documents are found, it creates | ||
and returns a newly persisted one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I meant the idea of persisting--that one's new to me.
new one, without persisting it to MongoDB. The syntax for | ||
``find_or_initialize_by()`` is the same for the ``find_or_create_by()`` | ||
method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need an "as" in here: "The syntax for X is the same as [the syntax] for Y."
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-44821
Staging - Starts at https://deploy-preview-61--docs-mongoid.netlify.app/interact-data/specify-query/#element-match
Self-Review Checklist