Hi all, I'm trying to parse a deeply-nested offline JSON object to an existing Model but unable to populate the associations.

It's a complicated Model with many direct & nested associations. I request the fully-bloomed JSON object from the server once & store it as a string locally for later offline usage. I've tried the following but unsuccessful so far(say 'json' is the offline JSON string):





  1. Code:



    Ext.create('The.Model', Ext.decode(json)));

    As per documentation somewhere, this doesn't process the associations.



  2. Code:



    Ext.create('Ext.data.Store', {
    autoLoad: true,
    model: 'The.Model',
    data: [Ext.decode(json)],
    proxy: { // The.Model has a REST proxy defined, need to switch proxy when offline
    type: 'memory',
    reader: {
    type: 'json'
    }
    }
    });

    This doesn't work either.

  3. I've tried the following: http://ift.tt/1Bk1AQo
    But it seems for Ext JS 4, which doesn't work under 5.0.1 here.


Any help is appreciated, thank you!