Nested relation filtering
We have a
user table (id, name, role…)
and section table (id, name…)
, bridged by a user_section table (userId, sectionId)
. Hence, a many-to-many relationship.
How can I accomplish in drizzle wherein I query for a section, including users (and its fields) under it, but only users
with the role “Student”
? Right now, I can only filter through userId
and sectionId
in the relational query API (see screenshot).6 Replies
This is a limitation of the current version of RQB, where you can only filter by the main table you're querying (in this case, that's the user table).
We will be addressing this in RQB v2, for now, you'll have to use the SQL-like query builder syntax
If you can provide me the desired query in RQB, I can help you translate it into the query builder syntax if you need help with that
Excause me, May i know when you release this ? for now, i really need to put where condition in relation to do soft delete. Thank you
Expect RQB v2 to release sometime early next year
so instead of this
we need to use this?
Yes
thx