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

Better way to populate a field in mongodb rust #1194

Closed
ChanManChan opened this issue Sep 3, 2024 · 2 comments
Closed

Better way to populate a field in mongodb rust #1194

ChanManChan opened this issue Sep 3, 2024 · 2 comments
Assignees

Comments

@ChanManChan
Copy link

I know we can populate a field using aggregate functions "$lookup" feature but is there a better and easy way to just populate a single field like in mongoose library for nodejs?

@github-actions github-actions bot added the triage label Sep 3, 2024
@ChanManChan ChanManChan changed the title How to populate a field in mongodb rust Better way to populate a field in mongodb rust Sep 3, 2024
@isabelatkinson
Copy link
Contributor

Hi @ChanManChan, the driver does not have any equivalent API to the populate functionality in mongoose; you'll need to call the aggregate method with a $lookup stage to do something similar in the driver.

@ChanManChan
Copy link
Author

Thanks for the help.

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