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

Best way to store UUIDs as _id? #872

Open
GingerAdonis opened this issue Jul 12, 2024 · 2 comments
Open

Best way to store UUIDs as _id? #872

GingerAdonis opened this issue Jul 12, 2024 · 2 comments

Comments

@GingerAdonis
Copy link
Contributor

Hi! Normally I store UUIDs using Mongo's UUID function, which is more performant than storing the hexadecimal string representation. However, I'm unsure how to properly achieve this in Papr.

Could anyone point me in the right direction? Thanks.

@GingerAdonis GingerAdonis changed the title Best way to use UUIDs as _id? Best way to store UUIDs as _id? Jul 12, 2024
@joshuat
Copy link
Collaborator

joshuat commented Jul 13, 2024

I think you can use the exported UUID class from the bson library.

@GingerAdonis
Copy link
Contributor Author

I think you can use the exported UUID class from the bson library.

Unfortunately the UUID class is not compatible with any of the types Papr accepts for _id.

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

2 participants