How to destroy a strongloop model in

, , Leave a comment

Questions : How to destroy Model in

Answer : We can delete loopback model by using following command

slc persistedModel.destroy()

But After executing this, you might get the following error
slc persistedModel.destroy() : command not found error.

If you get the error then follow these steps 

Step 1 :
Delete /common/models/your-model.js

Step 2 :
Delete /common/models/your-model.json 

Step 3 :
Delete the lines referencing your model in /server/model-config.json.
Also, delete references of relation in other models if relation created.


Leave a Reply