Skip to content Skip to sidebar Skip to footer

Delete Request Is Completing Before Get Request When Trying To Findrecord And Destroyrecord In Ember

I have the following code in ember 2.6; ember-data 2.6.1 import Ember from 'ember'; export default Ember.Route.extend({ activate() { var route = this; var sess

Solution 1:

this might be because ember already have that session on the store and returning that object to you and trying to update the object later via making a GET call.

which can happen after delete because promise was already resolved with store object.

What u can do is look for session object in store first with peekRecord and make findRecord call only if object in not found in store.

Other way would be make a forsed server call for findRecord for session which wont get resolved untill object is returned from server.

Hope this helps you.

Post a Comment for "Delete Request Is Completing Before Get Request When Trying To Findrecord And Destroyrecord In Ember"