Skip to content

Commit

Permalink
added note about Model.delete_all vs Model.all.destroy!
Browse files Browse the repository at this point in the history
  • Loading branch information
mattetti committed Sep 6, 2008
1 parent 6cee2cc commit 65bda3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions book/source/Chapters/4_A_Little_Blog/1_MVC/1_Models.markdown
Expand Up @@ -670,6 +670,8 @@ earlier, is a kicker method. It issues a `SELECT` appropriate to the conditions.
This command would update the `allow_beer` attribute of all people aged 21 or
older in the database, all in one `UPDATE` statement.

Note: ActiveRecord has a well known `Model.delete_all` class method to erase all table entries. In DataMapper to delete all instances of an Object in the database, you would do `Model.all.destroy!`

#### Aggregates

DataMapper by default does not provide aggregator methods, but dm-aggregates
Expand Down

0 comments on commit 65bda3c

Please sign in to comment.