Smart field filter with relation


I currently have a table A with one-to-one relation with B.
To obfuscate my DB relations, I created Smart fields in A to get fields from B.
How can I use the filter option on my table A smart fields to filter with the table B fields ?

Cheers :slight_smile:

Hi @Simon_BRAMI1 :wave: If I understand what you want to achieve
you can have a look on this documentation.
Let me know If that help :pray:

1 Like

Hey Arnaud! You put the wrong link mamen :joy:


Oops :sweat_smile: I edited the link sorry about that. :pray:

I know about this doc, but it does show how I could pass a condition that accesses a relation.

I saw another way of doing this by fetching the data I want and return in the condition all the ids but this solution does not scale well when you have thousands of records, the SQL query endup being way too long and so my instance can crash because they run out of memory just to allocate that much space in a single string.

Any idea of a clean way to return a condition that filter in a subrelation ?

something like:

return { 'B.column': { filterValue } }

In order to try to help you, can you share with us how do you declare your models and your smart field please :pray: