francescosyd
27 Dec 2010, 4:10 AM
Hi all,
I'm not sure if this behaviour is by design or a bug but when I update a stored record/item the item key seems to repeatedly append to the indexer value.
To update a record/stored item I'm using the following code:
var storeItem = myComponent.store.getById(373557);
storeItem .set('test', "hello in there");
//store.dirty = true;
storeItem.store.sync();
//model
Ext.regModel("Conversation", {
fields: [
{ name: "id", type: "int" },
{ name: "test", type: "string" }]
});
//store
Ext.regStore('Conversations', {
model: 'Conversation',
storeId: 'conversationsStore',
autoLoad: true,
autoSave: true //tried on and off, didn't make a difference
});
Viewing local storage files in Google Chrome I see that the value in key conversations-373557 is set correctly, however the value for the indexer conversations is '373557,373557,373557'. (Here I've updated a value in the record/item twice)
Each time I update the record/item and sync it the id for my record/item is appended to the indexer.
23980
Does anyone know if this is a bug, by design or am I doing something wrong?
thanks
Francesco
I'm not sure if this behaviour is by design or a bug but when I update a stored record/item the item key seems to repeatedly append to the indexer value.
To update a record/stored item I'm using the following code:
var storeItem = myComponent.store.getById(373557);
storeItem .set('test', "hello in there");
//store.dirty = true;
storeItem.store.sync();
//model
Ext.regModel("Conversation", {
fields: [
{ name: "id", type: "int" },
{ name: "test", type: "string" }]
});
//store
Ext.regStore('Conversations', {
model: 'Conversation',
storeId: 'conversationsStore',
autoLoad: true,
autoSave: true //tried on and off, didn't make a difference
});
Viewing local storage files in Google Chrome I see that the value in key conversations-373557 is set correctly, however the value for the indexer conversations is '373557,373557,373557'. (Here I've updated a value in the record/item twice)
Each time I update the record/item and sync it the id for my record/item is appended to the indexer.
23980
Does anyone know if this is a bug, by design or am I doing something wrong?
thanks
Francesco