Reputation: 276
I am trying to include multiple related models in a query:
/distributors?filter[include][depots]=drivers&filter[include]=delivery_times
However this seems to duplicate the drivers for each distributor and doesn't return any delivery_time.
This
/distributors?filter[include]=delivery_times
and this:
/distributors?filter[include][depots]=drivers
seems to work fine though.
What could be the issue here?
Upvotes: 0
Views: 109
Reputation: 2675
Multiple include should be done like this on REST:
/distributors?filter[include][0][depots]=drivers&filter[include][1]=delivery_times
Upvotes: 2