Here within a controller I create a rest store:
this.somePerson = Ext.create('Ilhan.store.Human', {
model: 'Ilhan.model.Human',
autoLoad: false
});
this.somePerson(123);
But it doesn't load the person with id 123 even though I have set idProperty in the model. It loadds all the humans.
This one loads can retrieve the human with ID 123.
Ext.ModelManager.getModel('Ilhan.model.Human').load(record.data.ID, {
success: function(recordd) {
someHuman = recordd;
}
});
It gets the human with ID 123 but then someHuman is not a store. Thus someHuman.sync() doesn't work, it says that sync() is not defined. Or if I use someHuman.save() it PUTs all the data to the server.
You must look at findBy.
example (not tested):