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

fix(schema): correctly handle uuids with populate() #13317

Merged
merged 3 commits into from
Apr 24, 2023

Conversation

vkarpov15
Copy link
Collaborator

Fix #13267

Summary

Couple of fixes to make UUIDs work better with populate:

  1. Make uuid getter avoid trying to transform populated docs into strings
  2. Avoid trying to cast UUIDs as populated docs

Examples

Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. 👍

Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with some minor additions

test/schema.uuid.test.js Outdated Show resolved Hide resolved
test/schema.uuid.test.js Show resolved Hide resolved
@vkarpov15 vkarpov15 merged commit 3ecf06a into master Apr 24, 2023
@hasezoey hasezoey deleted the vkarpov15/uuid-populate-fixes branch April 24, 2023 16:38
@martyzz1
Copy link

Is there any chance of getting this patched into the v6 branch?

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

Successfully merging this pull request may close these issues.

Binary UUID is not recognize as Bson Type when need to be cast
4 participants