I use Loopback4. When i want to add a mongoDb ObjectId property inside my model i do that :
@property({
type: 'string',
mongodb: {dataType: 'ObjectID'},
})
organizationId?: string;
Now i want to make an array with MongoDB ObjectId properties inside, so i tried to do :
@property({
type: 'array',
itemType: 'string',
mongodb: {dataType: 'ObjectID'},
})
tagsId?: string[];
but it seems like all the array is converted to one ObjectID inside the mongoDb.
What I want to do is to simply get an array with many ObjectId inside. I tried everything in my knowledgme: that was not enough.