inserts duplicate objects into the store cache

this.modelFor('master.feed').get('feedTracks').removeObject(feedTrack);'feed-track', =>{

feedTrack.share().then((response) => {
if (response != null) {
    var normalizedResponse ='feed-track', response);;

The code above works as planned at first. The feedTrack record is removed from the array in the model. And the API returns a new object which is then pushed to the store.

But when the push occurs, the old feedTrack record that I had deleted, gets repopulated back into the association array.

It’s as if the delete() call never actually did anything and when the model detects a change, it reloads it.

Is this a bug or am I doing something wrong?

Perhaps it is related to the unsolved ember-data bug. My fix for now: Temporary Fix for ember-data bug

See also: