View Full Version : WebStorageProxy issue

28 Jan 2011, 6:37 AM
I am having trouble adding/deleting records to local storage using WebStorageProxy. I saw a bug report regarding deletion, but not sure if they are caused by the same issue.

I noticed that even when a record is added to the local store, it fires delete for some other records, and the ids attribute of WebStorageProxy has all sorts of dupes.

On stepping through the code, I found that destroy function of WebStorageProxy does not call the following, while other methods like read/update/create do.

//following is not called in destroy function

Which leads to operation.wasSuccessful() to return false even if records were deleted and onProxyWrite callback of store does not clear this.removed array. So next time if there is another request (like create), it again tries to delete these records since this.removed array still has those records and it goes on forever.

Am I misinterpreting something or is this a known issue?

30 Jan 2011, 4:17 PM
This one is fixed in source control and will form part of the next release - thanks for the report

8 Feb 2011, 9:05 AM
When will that be?

24 Nov 2011, 5:42 AM
It seems that this issue has not yet been fixed, is that correct?

See: http://docs.sencha.com/touch/1-1/source/WebStorageProxy.html#Ext-data-WebStorageProxy

setSuccessful() is still not included in the destroy method, therefore when you only remove records from the store, the "removed"-Array does not get cleared.