1. #1
    Sencha User
    Join Date
    Feb 2013
    Posts
    31
    Vote Rating
    1
    Keab42 is on a distinguished road

      0  

    Default Answered: Automatically Deleting Associated Data

    Answered: Automatically Deleting Associated Data


    I'm using the HasMany Association on some data in a LocalStorage proxy. So far it seems to be working well in 2.1.1.

    However, when I remove all records on the parent store, the data stored in the associated models is not removed, leaving it orphaned.

    I've added in a routine to run through the records in the store cleaning their associated data before removing the records, but I was wondering if there was a config that I could set that ensured that when a parent object was removed, the associated objects are removed from their store as well?

  2. Syncing associated data is not supported in ST 2.1 out of the box.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,649
    Vote Rating
    898
    Answers
    3575
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Syncing associated data is not supported in ST 2.1 out of the box.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1