Skip to content

Add support for encoding/decoding strings as ObjectIds #98

@dambrisco

Description

@dambrisco

Currently, there's a rather unfortunate side effect of using this library in that you have to go pretty aggressively out of your way to use string-based IDs (especially in the case of microservices leveraging different DBs but using the same model library). One step toward improved support has been implemented in a PR against the originating fork: go-mgo#492

Yet more powerful might be the inclusion of a new tag that indicates that a given string field should be treated as an ObjectId for marshaling purposes.

Is there any resistance to the inclusion of this sort of feature?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions