At present, support for filtering by relationship values is very limited.
It is possible to filter a belongsTo relationship by singular id value using a bit of a hack. For example, a user belongs to a permission group. We want to find all users with permission level 4:
Also, taking #617 into consideration and allowing for filtering with > and < operators. For example, get all users with a permission id of greater than 2:
At present, support for filtering by relationship values is very limited.
It is possible to filter a belongsTo relationship by singular
id
value using a bit of a hack. For example, auser
belongs to apermission
group. We want to find all users with permission level 4:Relationship ids
The query above should be represented by the relationship key without having to specify it as
permissionId
:Multiple values should be able to be passed. For example, to get users with permissions of either 2 or 4:
Also hasMany relationships should accept single values or arrays of ids. For example, get all articles that are tagged with tag ID 8 or 10:
Advanced filtering
Advanced filtering could allow for relationship values to be filtered. For example, selecting articles by tag name 'foo':
Also, taking #617 into consideration and allowing for filtering with
>
and<
operators. For example, get all users with a permission id of greater than 2: