Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Support for UUID option in idGeneration #371

Open
txgruppi opened this issue Oct 24, 2019 · 0 comments
Open

Support for UUID option in idGeneration #371

txgruppi opened this issue Oct 24, 2019 · 0 comments

Comments

@txgruppi
Copy link

Give the users the option to have UUID strings as their document ID via the idGeneration option.

I'm using Meteor to create a new web app for an existing application. A really important restriction I have is that every ID in the system must be a UUID string.

It was easy to hack the collection object and change the _makeNewId to create UUID strings in a consistent way between client and server.

Why UUIDv4? Since the v4 is based only on random bytes, it is easier to have it play well with client/server id generation.

It is important to remember that this idea does not change/break anything for existing meteor applications.

I already have some code on the way to become a PR. Still need to add tests.

https://github.com/txgruppi/meteor/commit/e934b2a117291d2a61cb2c6b76734539c8cc7ed4

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

No branches or pull requests

1 participant