Skip to content

TinyMongo should enforce using ObjectId #51

@ramuta

Description

@ramuta

TinyMongo should enforce using ObjectId, just like MongoDB does.

The bson ObjectId can't be used directly, because it doesn't accept TinyDB ids (they are too short). So either make the TinyDB id the right size, or implement own ObjectId:

class ObjectId:
    def __new__(cls, *args, **kwargs):
        return str(args[0])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions