Closed devmuaz closed 1 year ago
expand
only expand what is in the record relation field and you can't perform further filtering.
The filter
query param if set apply only on the main collection records (in your case categories
), aka. even if you have: filter: "localization.locale ?= 'ar'"
, this will return "categories" records that have the matching localization.
If you need filtering or pagination for the "categoriesLocalization" you can send separate getList
request(s) to the "categoriesLocalization" collection and manually perform the "categories" grouping (you can emulate a "IN" condition by extracting the categories localization ids and apply a "categoriesLocalization" filter like id = 'id1' || id = 'id2' || ...
).
I thought there was something I missed out, and actually no I don't need pagination or something like that, but it would be much convenient to make such functionality available.
The localization
expandable field should be minimized because it would become much bigger if I have for instance more than 5 locales and most of them are useless except the one that's needed, so minimizing and filtering these data (relational data
) would really makes difference!
Hello,
I'm currently having an issue trying to filter out the expanded items to a certain condition, as as shown below:
The resulted data would be like this:
What I need is a way to filter the
expand.localization
to be equal to lets sayar
only which also minimizes the response size. It would be something like this: