Answers for "mongo object references in mongoose"

Go
0

mongo object references in mongoose

User = new Schema({
    places:[{type: Schema.Types.ObjectId, ref:'Place'}],
    shouts:[{type: Schema.Types.ObjectId, ref:'Shout'}]
});
Place = new Schema({
    name:String,
    description:String,
});
Shout = new Schema({
    content:String,
});
Posted by: Guest on May-27-2020

Code answers related to "mongo object references in mongoose"

Browse Popular Code Answers by Language