[英]Remove collection from model RacerJS?
This is my client Side code: 这是我的客户端代码:
model.remove('agent',{'text':'online'});
I cant able to remove collection from model,Its shows following error in console 我无法从模型中删除集合,它在控制台中显示以下错误
Error: remove must be performed under a collection and document id. Invalid path: agent
From the documentation, it looks like 'path' should be the collectionname.id. 从文档看来,“路径”应该是collectionname.id。 In this case, maybe I suppose it should be 'agent.id'. 在这种情况下,也许我认为它应该是“ agent.id”。
This blog refers that the path should be in the format collection.documentId.document. 该博客指出该路径应采用collection.documentId.document格式。
http://blog.derbyjs.com/2012/04/13/derby-v0-dot-3-0/ http://blog.derbyjs.com/2012/04/13/derby-v0-dot-3-0/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.