I have a question ... I have a schema like this :
const chatSchema = new Schema({
[...]
title: {
type: String,
required: true
},
message: [
{
content: {
type: String,
required: true
},
creator: {
type: mongoose.Types.ObjectId,
required: true,
ref: 'User'
}
}
],
[...]
});
in my Node backend, how can I have access to my creators instances inside my message array ? I don’t know how to write the query with populate ...
Thank you all ! :-)