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

Unable to generate UUID for ref types #37

Open
seanjamesbarry opened this issue Jul 14, 2020 · 1 comment
Open

Unable to generate UUID for ref types #37

seanjamesbarry opened this issue Jul 14, 2020 · 1 comment

Comments

@seanjamesbarry
Copy link

Hi,

Not sure if I'm doing something wrong but I want to have a field that is an array of objects (questions) and each object should have an id and some text. When I do this the question text is different for each question but the ID is the same? I want the ID to be unique and want to reference it in another collection as a primary key/foreign key for joins so to speak.

My Mongo playground is: https://mongoplayground.net/p/YgxGJnMHmr-

Thanks,

Sean

@feliixx
Copy link
Owner

feliixx commented Jul 14, 2020

Hi @seanjamesbarry,

This is actually a bug, the playground you linked should have worked. You can avoid the problem for now by setting a higher count for each collection, and set the array size to one, like this: https://mongoplayground.net/p/4P8Gn-dHpul

Thanks for reporting the issue, I'll try to fix it soon

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