How to use inner join with rqb?
Hello there!
Having the following schema
This query gives me all the "proyectos" when I actually want only those that match "plataformas" with id (aka plataforma) "[10,12]"
because drizzle is using LEFT JOIN to join the tables.
Is there a way to use "inner join" to filter all the rows with the inner where?
I'm still learning drizzle so I may be making a mistake anywhere else.
I hope I made myself clear enough (english is not my main language)
Thanks in advance!
4 Replies
Any idea about this one? Is my schema the problem or something else? Is it a bug? Something not yet covered by the drizzle? Am I misusing it?
This can be done by filtering by the nested relation
Unfortunately, filtering by the nested relation was removed in v0.28
But You could achieve a similar result with a subquery
I haven't tested this, so your milleage might vary, but it shopuld point you in the right direction
Thanks a lot Angelelz!!
No problem
By the way, this query should be fine for small enough tables
If you get to a performance bottleneck, you are going to drop to the CRUD API and maybe use a CTE