Skip to content

CSHARP-5588: Unable to select KeyValuePair Key when using camelCase convention #1724

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 2 commits into from
Jul 15, 2025

Conversation

sanych-sun
Copy link
Member

No description provided.

@sanych-sun sanych-sun requested a review from rstam July 14, 2025 18:06
@sanych-sun sanych-sun added the bug label Jul 14, 2025
@sanych-sun sanych-sun requested a review from a team as a code owner July 14, 2025 18:06
@sanych-sun sanych-sun removed request for a team and adelinowona July 14, 2025 18:06
Copy link

Assigned adelinowona for team dbx-csharp-dotnet because rstam is out of office.

@sanych-sun sanych-sun requested a review from adelinowona July 14, 2025 18:07
Comment on lines 32 to 39
// TODO: uncomment the code to demonstrate the fix, revert changes in the test class before merging into the main
// _useCamelCase = true;

if (_useCamelCase)
{
var defaultPack = new ConventionPack { new CamelCaseElementNameConvention() };
ConventionRegistry.Register("camelCase", defaultPack, c => true);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should keep a permanent tests around this to verify that registered conventions are respected instead of just having this for demonstration. You can just remove the convention once the test is done.

Not sure if we want to keep the test here or do what @rstam usually does which is create a test file with the ticket number and test the particular code the user had as repro code.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would love to have such tests permanently, but not sure if we can. As far as I know there is no way to have multiple serialization registries for now. If I leave the convention pack registered, it will affect all tests that are run after this particular class.

Copy link
Contributor

@rstam rstam left a comment

Choose a reason for hiding this comment

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

LGTM

@sanych-sun sanych-sun merged commit f271d6d into mongodb:main Jul 15, 2025
30 of 34 checks passed
@sanych-sun sanych-sun deleted the csharp5588 branch July 15, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants