DS.RESTAdapter#groupRecordsForFindMany()

groupRecordsForFindMany (store, snapshots) Array

Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:822

Organize records into groups, each of which is to be passed to separate calls to findMany.

This implementation groups together records that have the same base URL but differing ids. For example /comments/1 and /comments/2 will be grouped together because we know findMany can coalesce them together as /comments?ids[]=1&ids[]=2

It also supports urls where ids are passed as a query param, such as /comments?id=1 but not those where there is more than 1 query param such as /comments?id=2&name=David Currently only the query param of id is supported. If you need to support others, please override this or the _stripIDFromURL method.

It does not group records that have differing base urls, such as for example: /posts/1/comments/2 and /posts/2/comments/3

Parameters:

store DS.Store
snapshots Array

Returns:

Array
an array of arrays of records, each of which is to be loaded separately by `findMany`.
doc_EmberJs
2016-11-30 16:50:30
Comments
Leave a Comment

Please login to continue.