Mongodb (mongoose) model relationship

Hello,
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?

Thanks

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.
Thanks

1 Like