deleteRecord does not remove record from hasMany
When I call deleteRecord() on some of my hasMany relations, Ember Data
sends a (successful) DELETE request, but the record is not removed from
the view. I am displaying it using the render helper like this:
{{render "modules.list" modules}}
The interesting thing is that Ember Inspector reveals that after
deleteRecord() the corresponding object is <App.Module:ember1182:null> and
its parent is null, too. It's parent, however, still shows the record in
its hasMany (as <App.Module:ember1182:null>) When I reload the page and
then call deleteRecord(), it is removed from the view as expected.
It seems that deleteRecord() does not remove the record from the parent's
hasMany array. Oddly enough this works fine in other parts of my code. One
theory I have is that this has to do with the {render} helper, because
wherever I use that I have the same issue, but I am not sure if that's
what's causing the problem.
I am using the latest build of ember data (commit 2511cb1f77) although I
have had this problem even when I was still on 0.13. I thought upgrading
might solve the issue but it didn't.
No comments:
Post a Comment