I am trying to use hasMany relationship in loopback. I have problem while using it. I have an array, which is contains to ids from target model and I want to find all elements belongs to that array and I want to list them. How can I do it?
@property({
type: 'array',
itemType: 'string',
})
exampleArray?: string[];
@hasMany(() => MainComponent, {keyFrom: 'exampleArray', keyTo: 'id'})
mainComponent: MainComponent[];