Closed jariwbh closed 1 year ago
Without a more complete repro script, we won't be able to debug this. Our tests are passing so that code works as written. Can you please come up with more information as to what happens that causes autopopulate to stop working?
Hi @vkarpov15 in my case all of a sudden populate is not working with a findOne
query. I had to be more explicit like below for it to work
.populate({path: '...', model: '...'})
I do not see any change with my code that could cause this issue. With just .populate('path') it returns an empty array.
Any ideas why this is happening?
@Teebo without a repro script, hard to guess. Please open a new issue with a repro script.
Hi,
I have noticed this issue where autopopulate suddenly stop working for array. if we restart node, it start populating.
Schema is more less like example:
var bandSchema = new Schema({ name: String, members: [{ type: ObjectId, ref: 'people', autopopulate: true }] }); bandSchema.plugin(autopopulate);