-
Notifications
You must be signed in to change notification settings - Fork 47
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
saveChanges doesn't flush changed attributes #17
Comments
are you using auto track or manual mode? if manual mode you have to call model.startTrack() before you edit. |
|
Ember & Ember-data 2.10 |
ok .. so can you post a brief summary of code ( how you are using change tracker ) so I can see the full context. |
|
As above, other than that I only have this line in my appointment model:
btw being able to see old and new hasMany relationship when doing |
Is this the test you are showing me? or application code? You might have found a whacky situation that I did not cover. But I don't see it offhand. I used to show the changed for belongsTo / hasMany .. and it could be probably brought back as an option ?? I took it out because it could get ugly with more than 50 items. But for people using small data sets it is great. |
@danielspaniel I understand. I will try to build a test case but not sure I will have time. Right now I have another issue where none of the
|
strangely, the above is failing only when I run the unit tests for the model only, without other tests. When I run the whole test suite the test is passing because the EDIT: got it to work by manually launching the initializer in my unit test, like in your unit tests: |
@danielspaniel added failing test in #18 |
equivalent fix for ED >= 3.5: |
After using
appointment.saveChanges()
, I still see attributes inappointments.changed()
, coming fromappointment.changedAttributes()
.Calling
appointment._internalModel.flushChangedAttributes()
would solve the problem.The text was updated successfully, but these errors were encountered: