Hi everyone!
I am looking for the right way for filtering records by relational Id field via API.
Basic Problem:
Table Books has link many-to-many field Authors
I need to filter Books by related Author Ids: [1,2]
Currently, from the docs I would consider pretty much the only solution:
- get Authors with “where=(Id,in,1,2)”
- For each author, query get Book links using Author links retrieval endpoint.
- get Books with “where=(Id,in, id1,id2…)” ids from step 2
However, this seems an awful solution to me, I believe there is a more efficient approach.
Could somebody advice on that, please?
P.S
I could think of using lookup field on Books table called author_ids and filter by those directly, but nocodb interface doesn’t allow to create lookups on Id fields. So I am out of ideas here