Search code examples
extjssencha-touch-2sencha-architect

Local Storage with composite objects


I have 2 sencha-models.

1st is Profile 2nd is category

One profile contains many categories.

I will be saving the data in the browser's cache with the local storage proxy.

Do I simply need to save the Profile or would I need to read and save every category too?


Solution

  • Seems like the Local Storage system is designed in a way that composition is working correctly and dynamic array too.

    Just save the top level model and it will work fine.