Skip to content

DOCSP-42606: class maps feedback #592

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

Merged
merged 6 commits into from
Apr 23, 2025

Conversation

rustagir
Copy link
Collaborator

@rustagir rustagir commented Apr 15, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-42606

Staging Links

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?
  • Are the facets and meta keywords accurate?
  • Are the page titles greater than 20 characters long and SEO relevant?

Copy link

netlify bot commented Apr 15, 2025

Deploy Preview for docs-csharp ready!

Name Link
🔨 Latest commit 641fcdc
🔍 Latest deploy log https://app.netlify.com/sites/docs-csharp/deploys/6808f2fa527374000885eab8
😎 Deploy Preview https://deploy-preview-592--docs-csharp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@rachel-mack rachel-mack left a comment

Choose a reason for hiding this comment

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

Some suggestions:

Comment on lines 225 to 229
You can use GUIDs instead of ``ObjectId`` values to represent your
document IDs in MongoDB. By default, the driver uses the
``GuidGenerator`` type to generate a unique value for the ID property.
You must specify the GUID representation by initializing a
``GuidSerializer``.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on the description in the String IDs section, this seems like it goes against MongoDB best practices. Is there a reason we don't recommend this? Or is there a specific use case where we would recommend this?

Copy link
Collaborator Author

@rustagir rustagir Apr 15, 2025

Choose a reason for hiding this comment

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

I'll change the wording here to not suggest using GUIDs

Some people are migrating to MongoDB using legacy data, which might use UUIDs/GUIDs as the unique identifiers.

@rustagir rustagir requested review from a team, JamesKovacs and BorisDog and removed request for a team and JamesKovacs April 15, 2025 18:43
~~~~~~~~~~~

By default, the driver serializes all fields in your POCOS, whether you
define them or not. You can prevent specified fields from being
Copy link
Collaborator

Choose a reason for hiding this comment

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

By "define" you probably mean map/automap?. As a field in POCO is it's definition, therefore always defined.
I'd just omit that part.

@rustagir rustagir requested a review from BorisDog April 22, 2025 15:54
Copy link
Collaborator

@BorisDog BorisDog left a comment

Choose a reason for hiding this comment

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

Looks good, small change requested.

classMap.MapMember(h => h.Style).SetIgnoreIfNull(true);
});

.. note:: Numerical Properties
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for not catching this earlier: this applies also for any Value Type property (for example bool, char).
"Value Type Properties" naming would be more accurate.

@rustagir rustagir requested a review from BorisDog April 23, 2025 14:02
Copy link
Collaborator

@BorisDog BorisDog 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 663bde2 into mongodb:master Apr 23, 2025
6 checks passed
rustagir added a commit that referenced this pull request Apr 23, 2025
* DOCSP-42606: class maps improvements

* wip

* RM PR fixes 1

* BD tech review comments 1

* BD tech review comments 2

(cherry picked from commit 663bde2)
rustagir added a commit that referenced this pull request Apr 23, 2025
* DOCSP-42606: class maps improvements

* wip

* RM PR fixes 1

* BD tech review comments 1

* BD tech review comments 2

(cherry picked from commit 663bde2)
rustagir added a commit that referenced this pull request Apr 23, 2025
* DOCSP-42606: class maps improvements

* wip

* RM PR fixes 1

* BD tech review comments 1

* BD tech review comments 2

(cherry picked from commit 663bde2)
rustagir added a commit that referenced this pull request Apr 23, 2025
* DOCSP-42606: class maps improvements

* wip

* RM PR fixes 1

* BD tech review comments 1

* BD tech review comments 2

(cherry picked from commit 663bde2)
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