[ALOY-1129] Delete method shouldn't reset model's id
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-10-24T15:19:26.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.6.0 |
Components | Models |
Labels | community |
Reporter | Tim Poulsen |
Assignee | Feon Sua Xin Miao |
Created | 2014-09-08T12:23:35.000+0000 |
Updated | 2015-02-18T00:57:17.000+0000 |
Description
Community PR https://github.com/appcelerator/alloy/pull/547 "Model's ID should not be deleted (reset) in the adapter. The problem is that after the Sync is done Backbone will trigger destroy which will execute a method called _onModelEvent -> remove ,but model doesn't have an id anymore ,so it won't be deleted from a collection - set _byId. If you try to add a new model to the collection with the same ID, backbone will not allow you to do that because the ID already exists in the set."Attachments
File | Date | Size |
---|---|---|
ALOY-1129.zip | 2014-09-10T06:18:02.000+0000 | 1569832 |