Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    13
    Vote Rating
    0
    conscience is on a distinguished road

      0  

    Question [1.1.0] Data of Localstorage disappear

    [1.1.0] Data of Localstorage disappear


    Hi,

    I have a really strange behavior of my store.

    My Store has a local storage proxy and the model to, for sure.

    When I work with the store, add something, change something and so on ... any thing is fine. But when I restart the app (or reload it in the browser), the store can't find the data in the local storage, but the store knows how many records he have ...

    I have defined the store and models the same way we do it all the time till now in our project. The only difference between this buggy store and the others, is that I now use associations, are they buggy in some way ?

    thanks for any help

  2. #2
    Sencha User
    Join Date
    Mar 2011
    Posts
    13
    Vote Rating
    0
    conscience is on a distinguished road

      0  

    Default


    Has nobody an idea ?

    Here are some code snippets for more information about the structure:

    Code:
    SomeModel = Ext.regModel('SomeModel', {
        fields: [
            {name: 'id',        type: 'int'},
            {name: 'date',        type: 'date',    dateFormat:'d.m.Y'},
            {name: 'time',        type: 'date',    dateFormat:'H:i'},
            {name: 'street',    type: 'string'},
        ],
        
        proxy: {
            type: 'localstorage',
            id  : 'someModel'
        },
        
        associations: [
            {type: 'hasMany', model: 'SomeAssocModel', name: 'someAssocModel'},
        ],
    });
    
    SomeAssocModel = Ext.regModel('SomeAssocModel', {
        fields: [
            {name: 'id',                  type: 'int'},
            {name: 'somemodel_id',      type: 'int'},
            {name: 'someFields',      type: 'boolean'},
        ],
        
        proxy: {
            type: 'localstorage',
            id  : 'someAssocModel'
        },
        
        associations: [
            {type: 'belongsTo', model: 'SomeModel'}
        ],
    });
    
    Store = new Ext.data.Store({
        storeId: 'SomeStore',
        model: 'SomeModel',
        autoLoad: true,
        proxy: {
            type: 'localstorage',
            id  : 'someModel',
        },
    });