Skip to content

Relax contraints on document types #76

@clun

Description

@clun

When reading a document if the _id is a composed map, the UUID is marshalled will be UUIDv6, UUIDV7, or defauldUUID

But if the collection has no default ID it returned an error telling it should be a UUID instead of simply returning a UUID.

UUID uuid = UUID.randomUUID();
collectionSimple.insertOne(new Document().id(uuid).append("hello", "world"));
collectionSimple.findOne(Filters.eq(uuid));
java.lang.IllegalStateException: Returned _id is a UUID, but no defaultId is set in the collection definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions