Skip to content

Parent models should be saved on model deletion #75

@igorsantos07

Description

@igorsantos07

When you remove a model that pertains to an Array of a related model, that array is updated by Ember Data but not stored unless you manually call the parent model save() method.

Currently I'm solving this issue with the following code, but I think this should be automatic?

Board = ParseModel.extend
  name:    DS.attr 'string'
  project: DS.belongsTo 'project', async: true, inverse: 'boards'

  didDelete: ->
    @get('project').then (proj)-> proj.save()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions