You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 19, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 19, 2025. It is now read-only.
deleteRecord : recordWillDelete actually update the belongTo parent on firebase, causing crash #525
Since everything is done async, from time to time, the loopback of the parent set value will actually modify the record you are trying to delete ( I guess trying to set the parent to null ), right before deletion, so the state will not be valid anymore.
If I understand correctly, it is anyway the responsability of the user to "save" the parent value on modification, so emberfire should not do what it does ( or at least not modify the record value while in deletion).
Not sure if it is understandable, but what I did was to simply override the willDeleteRecord in the application adapter by that :
recordWillDelete: functionrecordWillDelete(store,record){// here we are doing nothing. Emberfire try to update parent for belongTo relationship directly// on firebase, which would lead sometimes to an error as the child get updated, while we delete it// when the parent receive the loopback from firebase.},
Activity
olivierchatry commentedon Sep 20, 2017
It is also written in the documentation, that you need to save both side :
https://github.com/firebase/emberfire/blob/master/docs/guide/relationships.md