-
30 Dec 2012 5:28 AM #1Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,459
- Vote Rating
- 56
[2.1] Inconsistent assignment of 'internalId' on models when using store.add()
[2.1] Inconsistent assignment of 'internalId' on models when using store.add()
When calling add on a store, things go wrong.
Code:Ext.define('M', { extend : 'Ext.data.Model', config : { idProperty : 'foo', fields : ['foo'] } }); var store = new Ext.data.Store({ model : 'M', data : [{ foo : 5 }] }) console.log(store.first().internalId); // => 5 store.add([{ foo : 1 }]); console.log(store.last().internalId); // undefined
-
30 Dec 2012 9:13 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Thanks for the report! I have opened a bug in our bug tracker.
-
13 Jan 2013 7:35 AM #3Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,459
- Vote Rating
- 56
Bump, any news on this one? Breaking a few things for us...
Related thread in our forum http://bryntum.com/forum/viewtopic.p...p=18207#p18207
-
14 Feb 2013 3:14 AM #4
Bump
Bump
Any news on this? I'm trying to insert an item to a store after removing an item. It appears to display correctly in a list but when you click an item in the list, it's returning a record w/o accounting for the inserted or removed records.
-
14 Feb 2013 1:17 PM #5
Work Around
Work Around
For a very hackish work around, I ended up creating 2 stores and when I update or remove items from the main store, I do a removeAll() on it and loop through the 2nd store and add it's values to the main store, this seems like the only way to get a fresh internal id for each item.
-
17 Feb 2013 10:33 AM #6Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,459
- Vote Rating
- 56
Bump, any idea when this might get fixed?
-
5 Apr 2013 6:10 AM #7
-
15 Apr 2013 5:42 AM #8Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
Somehow this bug got into the backlog in our system and we have only just dug this one up. This will be fixed in 2.2.1. Sorry for the delay

Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3865
in
Sprint 33.


Reply With Quote
