LoopbackJS 3.x, how to enable delete all matching instances
问题 By default in Loopback delete all matching instances is not exposed over REST API. How to enable it? 回答1: I couldn't find any reference to the documentation, but I successfully tested this. TLDR: Put in this in your model.js or in server.js app.models.<model>.remoteMethod('destroyAll', { description: 'Delete all matching records.', accessType: 'WRITE', accepts: [ {arg: 'where', type: 'object', description: 'filter.where object'}, {arg: 'options', type: 'object', http: 'optionsFromRequest'}, ]