(Quick Reference)

deleteAll

Purpose

Deletes all of the domain class instances for the specified query or the given ids

Examples

// 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)

Parameters: