-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
One to many relationship mongoose. #5989
Comments
|
This is the response, I have got.
I mean how would i modify json response that i am getting through populating model?
|
I'm sorry I still don't understand. What do you want to change in the response / why can't you do it with javascript? |
mongodb version v3.6.0
npm version 5.6.0
node version v8.9.3
I have used two schema blog and its comment.where it has a unidirectional relationship between blogs and comments (1 to Many).
Using this query, I am able to fetch all comments with its blog.
which is working fine.
1.How would I fetch all blogs with its comment with this unidirectional (reverse) one to many relationships?
2.How would I change "Image": "66a3d2f1.jpg" to "Image": "https://www.example.com/uploads/66a3d2f1.jpg" value?
Expected result.
The text was updated successfully, but these errors were encountered: