deleteAll
Purpose
Deletes all of the domain class instances for the specified query or the given idsExamples
// delete by query Book.deleteAll([author:'Dan Brown']) // delete by ids Book.deleteAll(["4c0cceac61b32d536cc6fdfa", "4c0cceac61b32d536cc6fdfb", "4c0cceac61b32d536cc6fdfc"]) // deletes ALL entities Book.deleteAll()
Description
The basic syntax for the method is:Book.deleteAll(Map query) Book.deleteAll(List ids)
query
- A filter for queryingids
- A list of ids of documents to delete