I have an issue regarding a mongoose schema :
`var ProjectSchema = new mongoose.Schema({
name: String,
resources: [{
employee: {type: Schema.Types.ObjectId, ref: 'Employee'},
dailyRate: Number
}],`...
and I'm trying with no success to populate the resources.employee
field... already tried :
.populate('resources.employee')
.populate('resources.employee', model: 'Employee'})
any advice ?
Thanks in advance
nevermind, was just my insert that did not work...
the correct syntax is :
.populate({path:'resources.employee', model:'Employee'})