1. #11
    Sencha User
    Join Date
    Feb 2012
    Location
    Illinois
    Posts
    93
    Vote Rating
    2
    bwags is on a distinguished road

      0  

    Default


    Quote Originally Posted by mrsunshine View Post
    you can check the count of the store and work with a record with the same ID, should be only one record in the store. so if no record exist create one otherwise work with the existing one
    I'm doing this, but notice that if I check the Resources tab in Chrome's Developer Tools under LocalStorage -> localhost, I can see that there are entries for both 'myUniqueProxy' and 'myUniqueProxy-0' (I set the id to the model to be 0).

    There are never any more entries in 'myUniqueProxy-0' other than the one I want, however it looks like there are tons entries for '0' in 'myUniquProxy'. Apparently one for every save despite it being the same record.

    Here's an image of what I'm seeing (don't pay attention to any malformed data, I modified it for this post):

    screenshot.png

    My proxy is setup like this:
    Code:
            proxy : {
                type : 'localstorage',
                id : 'myUniqueProxy',
            }
    My Model has an id field like this:
    Code:
           {
                name : 'id',
                type : 'integer',
                defaultValue : 0,
                isUnique : true
            }
    Then just like you said, I call for the store to getRecordById(0), update that record with current data and save it.

    Am I doing something wrong to get so many entries in the 'myUniqueProxy' entry?

    Thanks in advance for any advice.

    bwags
    Last edited by bwags; 19 Jun 2012 at 7:48 AM. Reason: Added image

  2. #12
    Sencha User
    Join Date
    Jun 2012
    Posts
    12
    Vote Rating
    -2
    jamie.mcleish has a little shameless behaviour in the past

      0  

    Default


    Hi there,

    I was wondering if you happened to find a workaround for this? When you reload the page do you automatically get more entries in local storage. There should only be one entry in localstorage which we update, but it appears to create new objects upon refresh.

    Thanks. :-)

  3. #13
    Sencha User
    Join Date
    Feb 2012
    Location
    Illinois
    Posts
    93
    Vote Rating
    2
    bwags is on a distinguished road

      0  

    Default


    Quote Originally Posted by jamie.mcleish View Post
    Hi there,

    I was wondering if you happened to find a workaround for this? When you reload the page do you automatically get more entries in local storage. There should only be one entry in localstorage which we update, but it appears to create new objects upon refresh.

    Thanks. :-)
    I get a new entry for every user settings object that I save, but they all have the same id. Also, it appears to work correctly. By that I mean if I save a user setting then reload the page and the settings object, it is correct and up to date.

    I started another thread for this....http://www.sencha.com/forum/showthre...of-the-same-id.

    bwags

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi