Ember Data's moved on quite a bit since I wrote my pull request, so I'd need to do it again. I've decided to lay out the case here and if you and the other members of the team feel it's a good idea then I'll do it again.
Here's the approach that I'm advocating:
- Whenever the store asks the adapter to fetch some records a
Requestobject (a new class) is created that contains the information required to request another page of results. - The
Requestobject is also used to contain thesinceTokenthat's currently there - The
metaobject that's returned from the server is then attached to theRequestobject, which is attached to the returnedRecordArrayso that downstream users of theRecordArray(eg.ArrayControllers) have access to the page number, page size and the total number of records RecordArrays would have two new methods:fetchPage()andfetchMore(), which would use the information in theRequestobject to perform another fetch from the server.- Adapters can control the para