Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJSIV-8281 in 4.2.0 Sprint 3.
  1. #1
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Helsingborg, Sweden
    Posts
    2,494
    Vote Rating
    57
    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 [4.2.0.265] TreeStore CRUD broken

    [4.2.0.265] TreeStore CRUD broken


    This was broken back in 4.0.x, new regression in 4.2.0. 'internalId' is not set on a newly created Record. This breaks nodeHash when removing a record later.

    Code:
    Ext.onReady(function() {
        Ext.define('Task', {
            extend: 'Ext.data.Model',
            idProperty : 'Id',
            fields: [
                {name: 'Id' },
                {name: 'task',     type: 'string'},
                {name: 'user',     type: 'string'},
                {name: 'duration', type: 'string'},
                {name: 'done',     type: 'boolean'}
            ]
        });
    
        var store = Ext.create('Ext.data.TreeStore', {
            model: 'Task',
            proxy: {
                type: 'ajax',
                //the store will get the content from the .json file
                api: {
                    create : 'treecreate.json'
                }
            },
            root : {},
            listeners : {
                write : function() {
                      console.log(this.getRootNode().firstChild.internalId) // SHOULD BE 111
                }
            }
        });
    
        store.getRootNode().appendChild(new Task({}));
        store.sync();
    });
    Server responds:
    Code:
    [{
        task:'Project: Shopping',
        Id : 111,
        user:'Tommy Maintz',
        iconCls:'task-folder'
    }]

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    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 mitchellsimoens has much to be proud of

      0  

    Default


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