-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
We've run into a scenario lately where we're trying to filter a collection based on the count of a child collection.
For example, we want to filter users who are assigned to groups. Based on the OData specification, the $count query option or length operator are available to get counts on collections.
For reference how to use these, refer to:
- Example 32 - 4.8 Addressing the Count of a Collection
- Example 43 - 4.12 Addressing a Subset of a Collection
GET /users?$filter=groups/$count gt 0GET /users?$filter=groups/$count
- Example 73 - 5.1.1.5.5 length
GET /users?$filter=length(groups) gt 0
Does anyone have thoughts on how something like this might be implemented to a Sequelize query?
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels