Skip to content

Conversation

@rustagir
Copy link
Contributor

@rustagir rustagir commented Jun 15, 2023

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-30063
Staging:

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?

@rustagir rustagir force-pushed the DOCSP-30063-withDocument-method branch from 9cc4a44 to ead074e Compare June 15, 2023 20:26
@rustagir rustagir requested a review from cbullinger June 15, 2023 20:41
Copy link
Collaborator

@cbullinger cbullinger left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Contributor Author

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
Copy link
Collaborator

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?

Suggested change
contains represented by the ``Fruit`` data class but return the result
contains data represented by the ``Fruit`` data class but return the result

Copy link
Contributor Author

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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:
Copy link
Collaborator

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

Copy link
Contributor Author

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.

@rustagir
Copy link
Contributor Author

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.

@rustagir rustagir requested a review from rozza June 16, 2023 17:51
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rustagir rustagir merged commit 8ebf256 into mongodb:master Jun 20, 2023
rustagir added a commit that referenced this pull request Jun 20, 2023
# 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)
cbullinger pushed a commit that referenced this pull request Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants