Skip to content

Updating an exisitng model doesn't work #24

@Globegitter

Description

@Globegitter

I have the following code to create a new model:

testModel = this.emberSync.createRecord('test', {
  email: this.get('email'),
  name: this.get('name'),
});
testModel.emberSync.save();

This works fine and the model gets saved to the server.

At a later time (after the save has been successfully completed) the user enters something and the model gets updated as follows:

testModel.set('name', 'anothername');
testModel.set('otherAttribute', 'otherValue');
console.log(testModel.get('isDirty')) //true
testModel.emberSync.save();

Ember Inspector shows the new name, otherAttribute and isDirty is true. But no request gets sent to the server.
Removing ember-sync and it works fine.
Any idea what the issue could be?

Edit: Storing offline seems to work though.

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