It seems to be working - the only problem is that it populates and returns only the first item of the array. for example, a document containing: flows: ['objectid1', 'objectid2']
I'll get in the result of the virtual field:
flowData: [{
id: 'objectid1',
...
}]
I can't tell if it's something that I'm missing or an issue with the library, so I would appreciate your help.
Thank you 🙏
Hello,
I have a mongoose scheme that contains an object id ref array to a different schema:
I've created a virtual field with autopopulate prop:
It seems to be working - the only problem is that it populates and returns only the first item of the array. for example, a document containing:
flows: ['objectid1', 'objectid2']
I'll get in the result of the virtual field:
I can't tell if it's something that I'm missing or an issue with the library, so I would appreciate your help. Thank you 🙏