Skip to content

Why is the _id a uuid #149

@singersbalm

Description

@singersbalm

Discussed in #148

Originally posted by singersbalm March 19, 2024
Why can't I define a custom _id?. I tried to define a users collection with the email as _id to improve lookup performance.

func isValidObjectId(id string) bool {
	_, err := uuid.FromString(id)
	return err == nil
}

Clover only allows uuids, but why. what's the benefit? Shouldn't that check be optional?

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