Skip to content

MongoDbRepository - Primary key always has to be convertable to ObjectId? #56

Description

@lokalan

First off, thanks for fixing my previous issue regarding the RepositoryPrimaryKeyAttribute so quickly. It's nice to know this project is actively worked upon.

On the MongoDbRepository implementation update and deletes, you're always converting the primary key to a Mongo ObjectId. In essence, you've now forced all our domain object PK's to not just be strings, but strings that can be converted to ObjectId's.

The expected behavior would be to convert the primary key to whatever RepresentationSerializationOptions is set on the property instead of always converting to ObjectId when querying Mongo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions