What about the idea of passing metadata as second parameter to store.find handler?
It is very limiting that metadata are stored per type.
I am thinking abot something like this:
(function (App) { “use strict”;
/**
* Table route.
* @constructor
* @memberof Application
* @alias Application.UserRoute
* @augments App.BaseRoute
*/
App.UserRoute = App.BaseRoute.extend({
dataModel: null,
dataModelName: null,
setupController: function(controller, model) {
var self = this;
var query = {
offset: controller.get('query.offset'),
limit: controller.get('query.limit')
};
return new Ember.RSVP.Promise(function (resolve) {
self.get('store').find('user', query).then(function(data, meta) {
console.log(meta);
resolve(data);
controller.set('content', data);
}, function(error) {
resolve(null);
});
});
}
});
})(window.App);
What do you think of it?