-
Notifications
You must be signed in to change notification settings - Fork 20
DOCSP-30063: specify return type using withDocument #91
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-30063: specify return type using withDocument #91
Conversation
9cc4a44 to
ead074e
Compare
cbullinger
left a comment
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 looks great! Nice job!
| With the MongoDB Kotlin driver, data can be modeled using Kotlin data classes or you can use a | ||
| `Document <{+api+}/apidocs/bson/org/bson/Document.html>`__ class | ||
| to store and retrieve data from MongoDB. | ||
| With the MongoDB Kotlin driver, You can model data by using Kotlin data |
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.
| With the MongoDB Kotlin driver, You can model data by using Kotlin data | |
| With the MongoDB Kotlin driver, you can model data by using Kotlin data |
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.
facepalm
| such as ``findOneAndUpdate()`` or ``findOneAndReplace()``. | ||
|
|
||
| The following example shows how you can retrieve a collection that | ||
| contains represented by the ``Fruit`` data class but return the result |
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.
missing a word? data? documents?
| contains represented by the ``Fruit`` data class but return the result | |
| contains data represented by the ``Fruit`` data class but return the result |
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.
facepalm again
| import org.junit.jupiter.api.Test | ||
| import org.junit.jupiter.api.TestInstance | ||
| import java.util.concurrent.TimeUnit | ||
| import kotlin.test.Ignore |
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.
is this actually being used?
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.
WIll remove any unused imports from both code files relating to this PR
| The following example shows how you can retrieve a collection that | ||
| contains represented by the ``Fruit`` data class but return the result | ||
| of a ``findOneAndUpdate()`` operation as an instance of the ``NewFruit`` | ||
| class: |
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.
suggestion: mention the renamed field? it honestly took me a second to realize the difference between Fruit and NewFruit
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.
added descriptions of the operation to both pages.
|
I moved the subsection on the DB/collection page from the create coll section to the access a coll section, as the method applies when you are accessing a collection, not when you are creating one. |
rozza
left a comment
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
# Pull Request Info [PR Reviewing Guidelines](https://github.com/mongodb/docs-java/blob/master/REVIEWING.md) JIRA - https://jira.mongodb.org/browse/DOCSP-30063 Staging: - [Specify return type in DB/coll page](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-30063-withDocument-method/fundamentals/databases-collections/#specify-return-type) - [new content in data class doc format pg](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-30063-withDocument-method/fundamentals/data-formats/document-data-format-data-class/#retrieve-a-data-class) ## Self-Review Checklist - [x] Is this free of any warnings or errors in the RST? - [ ] Did you run a spell-check? - [ ] Did you run a grammar-check? - [x] Are all the links working? (cherry picked from commit 8ebf256)
[PR Reviewing Guidelines](https://github.com/mongodb/docs-java/blob/master/REVIEWING.md) JIRA - https://jira.mongodb.org/browse/DOCSP-30063 Staging: - [Specify return type in DB/coll page](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-30063-withDocument-method/fundamentals/databases-collections/#specify-return-type) - [new content in data class doc format pg](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-30063-withDocument-method/fundamentals/data-formats/document-data-format-data-class/#retrieve-a-data-class) - [x] Is this free of any warnings or errors in the RST? - [ ] Did you run a spell-check? - [ ] Did you run a grammar-check? - [x] Are all the links working? (cherry picked from commit 8ebf256)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-30063
Staging:
Self-Review Checklist