Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the _id a uuid #149

Open
singersbalm opened this issue Mar 19, 2024 Discussed in #148 · 0 comments
Open

Why is the _id a uuid #149

singersbalm opened this issue Mar 19, 2024 Discussed in #148 · 0 comments

Comments

@singersbalm
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant