Let's say I have this model:
// app/models/user.js
export default DS.Model.extend({
name: DS.attr('string'),
messages: DS.hasMany('message')
});
When I use user.get('messages')
, it will return all records inside it even if it's a million. I only want to get the last 20 or the first 20 of the record to save network data.
I can't use query because of security issues. I don't want other users to be able to query a user's private messages.
I'm looking for a client side only solution through Ember. Is that possible?
Aucun commentaire:
Enregistrer un commentaire