View Full Version : Changes done to the local copy of record fetched from store reflected in store data

30 Mar 2015, 3:28 AM
I have a local copy of a particular record fetched from store.
When i make changes in data of that copy it get's reflected in the store data as well.
How can this be avoided can any one give solution for this.
Here is a code snippet for example.

var countryStore = this.getCountryStoreStore();
var record = countryStore.findRecord('countryName','Germany');
record.data.countryName = 'Belgium';

In the above case when i initially fetch the record the countryName was Germany.
After updating the record's countryName that change get's reflected in the store as well.

So i wanted some help in finding solution for this to avoid the chages to get reflected in Store.

Thanks & Regards

Gary Schlosberg
1 Apr 2015, 1:41 PM
Can you set the autoSync (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.Store-cfg-autoSync) config to false? If not, can you describe the use case a bit more?