简体   繁体   中英

ember-data exception while record is “deleted.inFlight”

I'm having trouble debugging this error I'm getting while deleting a record. I have a CartItem model that's used as part of a shopping cart.

When I delete the record and persist the change:

cartItem.deleteRecord()
cartItem.save()

This error is raised in the console:

Attempted to handle event becameError on MyApp.CartItem:ember1606:null while in state rootState.deleted.inFlight. Called with undefined

I'm using Ember 1.0 and ember-data 0.13. I've been reading the ember-data source, and I would just like some tips on how to debug this.

我很确定在旧版本的Ember Data中你想要使用cartItem.get('store').deletedRecord(cartItem)而不是cartItem.deletedRecord()cartItem.get('store').commit()而不是cartItem.save()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM