lundi 6 février 2017

What is the correct way to delete multiple records (bulk deletion) using Ember Data?

What I have is a list of record IDs, for example [1, 20, 20].

Query each item and delete them seems inefficiency.

store.findRecord('post', 1).then(function(post) {
  post.deleteRecord();
  post.save(); // => DELETE to /posts/1
});

I would like to delete multiple records at the same time. What is the correct way to do so using Ember data?




Aucun commentaire:

Enregistrer un commentaire