I’m running into a frustrating issue with ED. Let’s say we have two models; Event and Participant. Participant is nothing special, Event looks something like this:
export default DS.Model.extend({
participants: DS.hasMany('participant', {async: true})
});
The Event is populated with Participants via an API sub-collection like events/:event_id/participants
, which is provided via "links"
. Like many API collections, this one is paginated and defaults to 10 resources per page rather than trying to roll up possibly hundreds or thousands of resources in a single response (for the sake of payload size and response time).
Is there a way I can access the "meta"
property of a request for an async hasMany
relationship? And is this data cached anywhere specific to each Event record?
I can use metadataFor('participant')
one time, but viewing another Event record will overwrite that; so, it’s not the right tool here.