The default identifier is id . You can change it either on the model or on the proxy reader.
Note. The repository may use a proxy model of the model (not specified in this example).
Example (with both)
// Set up a model to use in our Store Ext.define('User', { extend: 'Ext.data.Model', idProperty: 'Id', fields: [ {name: 'firstName', type: 'string'}, {name: 'lastName', type: 'string'}, {name: 'age', type: 'int'}, {name: 'eyeColor', type: 'string'} ] }); var myStore = Ext.create('Ext.data.Store', { model: 'User', proxy: { type: 'ajax', url: '/users.json', reader: { type: 'json', root: 'users', idProperty: 'Id' } }, autoLoad: true });
source share