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

Document populate type is returning an ObjectId & PopulatedType #11955

Closed
2 tasks done
JeromeDeLeon opened this issue Jun 20, 2022 · 0 comments
Closed
2 tasks done

Document populate type is returning an ObjectId & PopulatedType #11955

JeromeDeLeon opened this issue Jun 20, 2022 · 0 comments
Labels
typescript Types or Types-test related issue / Pull Request
Milestone

Comments

@JeromeDeLeon
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Mongoose version

6.3.4

Node.js version

14.18

MongoDB server version

4.5.0

Description

I have an issue with document.populate where it always returns an intersection of objectId & the populated types itself and find it weird that it is not an issue for query.populate but maybe because you use UnpackIntersection.

Steps to Reproduce

TS playground

Expected Behavior

I'm expecting it to return just the populated document type and not to have ObjectId

@vkarpov15 vkarpov15 added this to the 6.4.2 milestone Jun 20, 2022
@vkarpov15 vkarpov15 added the typescript Types or Types-test related issue / Pull Request label Jun 20, 2022
vkarpov15 added a commit that referenced this issue Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Types or Types-test related issue / Pull Request
Projects
None yet
Development

No branches or pull requests

2 participants