Answers for "id of other schema type mongoose"

0

id of other schema type mongoose

var postSchema = new Schema({
    name: String,
    postedBy: {type: mongoose.Schema.Types.ObjectId, ref: 'User'},
    dateCreated: Date,
    comments: [{body:"string", by: mongoose.Schema.Types.ObjectId}],
});
Posted by: Guest on April-13-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language