Mongodb (mongoose) model relationship

I am trying building an API by using Nodejs(express) and Mongodb(mongoose). I have two collection user and images. A user has one or multiple images and one or many images have one single user. I got difficulty to create.
Some one can give me a good example of their model please?


I hope this will be of some help.

Thanks for your suggestion!
I saw it before and I search again but I couldn’t find exactly what I want.
It describe how to embed that i found.
Sorry may be I didn’t looking for a lot.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.