Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-3865 in Sprint 33.
  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,459
    Vote Rating
    56
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default [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

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,459
    Vote Rating
    56
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default


    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

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Posts
    22
    Vote Rating
    1
    camdagr8 is on a distinguished road

      0  

    Default 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.

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    22
    Vote Rating
    1
    camdagr8 is on a distinguished road

      0  

    Default 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.

  6. #6
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,459
    Vote Rating
    56
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default


    Bump, any idea when this might get fixed?

  7. #7
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,459
    Vote Rating
    56
    mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough mankz is a jewel in the rough

      0  

    Default


    Bump bump bump, 3 months...

  8. #8
    Sencha - Sencha Touch Dev Team
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,235
    Vote Rating
    4
    TommyMaintz will become famous soon enough

      0  

    Default


    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