The problem is explained at the github issue.
The store has a cache for each model type, then when the store fetch data with the _findAll method method, it does not assume that is returning all the data, so the following steps are applied
store.pushMany(type, payload); // push the server response data to the local store
store.didUpdateAll(type); // update record with the most up-to-date record
return store.all(type); // return all the record in the local store
It will not take in consideration any record deletion as it is discussed in the issue, in this case the new response data would be added to the local store if a record with its same primaryKey cannot be found or in the other case, it will update the local copy.
I created a test to check the defined behaviour:
test('store.findAll does not manage record deletion', function() {
$.mockjaxClear();
$.mockjax({ url: '/categories', dataType: 'json', responseText: {
categories:[ {id: 1, name: "Name1"}, {id: 2, name: "Name2"} ]}});
var store = this.store();
stop();
store.find('category').then(function(result) {equal(result.get('length'), 2, 'the new item returned with ajax is added to the local store'); $.mockjaxClear(); $.mockjax({ url: '/categories', dataType: 'json', responseText: { categories:[ {id: 3, name: "Name3"}, ]}}); store.find('category').then(function(result) { equal(result.get('length'), 3); $.mockjaxClear(); $.mockjax({ url: '/categories', dataType: 'json', responseText: { categories:[ {id: 3, name: "Name4"}, ]}}); store.find('category').then(function(result) { equal(result.get('length'), 3); equal(result.objectAt(2).get('name'), 'Name4', 'the old item returned with the new ajax request updates the local store'); start(); }); });
});
});
As you pointed something like find('modelName', {}) would solve your issue:
this.store.find('user', {})