Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESTAdapter learned side-deleting. #379

Closed
wants to merge 1 commit into from

Commits on Oct 17, 2012

  1. RESTAdapter learned side-deleting.

    If the adapter has a deleteMapping property, records can be side deleted as well
    as sideloaded when responses set this property to a hash of type names to list
    of ids.  For example:
    
      store.adapter.deleteMapping = '_deleted';
    
      // POST /people
      {
        person: { id: 1, name: "David" },
        groups: [{ id: 1, name: "Coffee Addicts" }],  //sideloading
        _deleted: {                                   // side deleting
          groups: [ 3, 4, 5 ],
          people: [ 6 ]
        }
      }
    hjdivad committed Oct 17, 2012
    Copy the full SHA
    a961815 View commit details
    Browse the repository at this point in the history