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

Updating an exisitng model doesn't work #24

Open
Globegitter opened this issue Oct 14, 2014 · 3 comments
Open

Updating an exisitng model doesn't work #24

Globegitter opened this issue Oct 14, 2014 · 3 comments

Comments

@Globegitter
Copy link

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.

@kurko
Copy link
Owner

kurko commented Oct 14, 2014

Not really. As far as I can remember, it's covered by tests and should work. Unfortunately I'm busy on a project that's not using Ember Sync, so I can't debug it myself. If you could do that, which wouldn't be that hard imo, I can help you out by pointing the ways.

@kurko
Copy link
Owner

kurko commented Feb 21, 2015

@Globegitter did you give up on this? I have some time and could take a look at it myself.

@Globegitter
Copy link
Author

@kurko Yes, we switched to a different solution for that app. I would still love to get this to work because we will most likely revisit ember-sync for a future project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants