Search code examples
node.jsracerjs

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

Solution

  • From the documentation, it looks like 'path' should be the collectionname.id. In this case, maybe I suppose it should be 'agent.id'.

    This blog refers that the path should be in the format collection.documentId.document.

    http://blog.derbyjs.com/2012/04/13/derby-v0-dot-3-0/