Destroy a model in loopback.io

Abhishek Goel picture Abhishek Goel · Feb 14, 2015 · Viewed 17.2k times · Source

How can I delete a model in strongloop's loopback.io?

I have seen somewhere command called persistedModel.destroy()

but when I exectute slc persistedModel.destroy()

I get command not found error.

Answer

superkhau picture superkhau · Feb 14, 2015

Delete /common/models/your-model.js and /common/models/your-model.json, then delete the lines referencing your model in /server/model-config.json.