Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.
This repository was archived by the owner on Oct 26, 2025. It is now read-only.

Thomas Lorimor MongoLinqPlusPlus Issues Strange mapping of fields named "Id" #7

@tom1952

Description

@tom1952

It looks like the BsonDeserializer maps any C# fields/properties name "Id" to "_id" automatically, even without the [BsonId] or [BsonElement] attributes. This is annoying since sometimes we fall back to Json.net which won't do the same auto-mapping.

I need to create unit tests for all incantations of deserializing fields named "Id", "ID", "_id", etc and make sure they work for named and anonymous types, groupings, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions