Enable filtering on a relation

Hi,
Consider two collections with one-to-many relations.
How can I make “one” relation side filterable?
The relation is detected automatically right now by the Forestadmin’s agent on top of NestJs.

Here are the related sections of the collections:

@Entity()
export class Referral extends BaseEntity {
...

@OneToMany(() => ReferralStage, (ReferralStage) => ReferralStage.referral, {
    eager: true,
  })
  stages: ReferralStage[];

...
}
@Entity()
export class ReferralStage extends BaseEntity {

...

@ManyToOne(() => Referral, (referral) => referral.stages)
  referral: Referral;

...
}

Hello @bond

I’m sorry I don’t understand your issue.
I suppose you are using the datasource-sql connector

Can you give me more context? What are you trying to achieve?

1 Like

Hello @anon39940173
As I mentioned above, we are using Forestadmin on top of NestJs which is detecting the data models through the data-source connector.
We have an entity that has a one-to-many relationship named referral stages - detected automatically by the SDK. You can see we can not enable it to be filtered as a relation.
Is there anything we’ve missed to enable this capability?

Has this explanation cleared the ambiguity?
@anon39940173 @anon34731316