Thank you for reporting this bug. We will make it our priority to review this report.
[FIXED] Invalid id for records loaded from local storage
Sencha Touch version tested:
Platform tested against:
- When a store using a LocalStorageProxy is loaded, its records do not contain the correct id. Instead of having the id present in the local storage, a auto generated id is assigned.
- So next, the getId function of record and the indexOfId function of store do not behave as expected.
- The problem seems to be in the getRecord function of WebStorageProxy class : when the record is instantiated, the id is not passed to the constructor.
By changing the line 9204 of sencha-touch-debug.js
with the below line where content in blue is added
record = new Model(data);
it works fine.
record = new Model(data, id);
Thanks, I've applied your fix to the 1.0.x branch - it'll appear in the next release