backbone.js model.destroy 嵌套模型和对象
如果我调用 model.destroy
,并且我的模型有嵌套骨干模型和/或普通JS对象,骨干是否也会处理它们的破坏,或者我会以某种方式拥有“悬空”对象吗?
从带注释的来源来看,这对我来说并不是很明显。感谢您的帮助。
If I call model.destroy
, and my model has nested backbone models and/or plain JS objects, does backbone take care of their destroys as well, or will I somehow have 'dangling' objects?
From the annotated source it's not immediately obvious to me. Thanks for help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,Backbone 除了向服务器发送针对该资源的删除请求外不会做任何事情。
No, Backbone will not do anything more than send a delete request to the server for that one resource.