'Mikro-ORM disable filter at controller / resolver level

I have two entities and filters with the same name. Note: cond is different for these two entities.

@Filter({ 
    name: "myFilter", 
    cond: (args) => ({ someProperty: args.someArg }),
})
export class Foo {}


@Filter({ 
    name: "myFilter", 
    cond: (args) => ({ someDifferentProperty: args.someArg }),
})
export class Bar {}

Is there a way to pass myFilter only for entity Foo? In other words, I want to disable myFilter for entity Bar. I'm not talking about enabling/disabling them at ORM initialization level but at controller/resolver level.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source