 
        Model Class Update Functions numeric model
Updates all properties for the records that match the where argument.
Property names and values can be passed in either using named arguments or as a struct to the properties argument.
By default, objects will not be instantiated and therefore callbacks and validations are not invoked.
You can change this behavior by passing in instantiate=true.
This method returns the number of records that were updated.
| Name | Type | Required | Default | Description | 
|---|---|---|---|---|
| where | string | No | Maps to the WHEREclause of the query (orHAVINGwhen necessary). The following operators are supported:=,!=,<>,<,<=,>,>=,LIKE,NOT LIKE,IN,NOT IN,IS NULL,IS NOT NULL,AND, andOR(note that the key words need to be written in upper case). You can also use parentheses to group statements. You do not need to specify the table name(s); CFWheels will do that for you. | |
| include | string | No | Associations that should be included in the query using INNERorLEFT OUTERjoins (which join type that is used depends on how the association has been set up in your model). If all included associations are set on the current model, you can specify them in a list (e.g.department,addresses,emails). You can build more complex include strings by using parentheses when the association is set on an included model, likealbum(artist(genre)), for example. These complexincludestrings only work whenreturnAsis set toquerythough. | |
| properties | struct | No | [runtime expression] | The properties you want to set on the object (can also be passed in as named arguments). | 
| reload | boolean | No | false | Set to trueto force CFWheels to query the database even though an identical query for this model may have been run in the same request. (The default in CFWheels is to get the second query from the model's request-level cache.) | 
| parameterize | any | No | true | Set to trueto usecfqueryparamon all columns, or pass in a list of property names to usecfqueryparamon those only. | 
| instantiate | boolean | No | false | Whether or not to instantiate the object(s) first. When objects are not instantiated, any callbacks and validations set on them will be skipped. | 
| validate | boolean | No | true | Set to falseto skip validations for this operation. | 
| transaction | string | No | [runtime expression] | Set this to committo update the database,rollbackto run all the database queries but not commit them, ornoneto skip transaction handling altogether. | 
| callbacks | boolean | No | true | Set to falseto disable callbacks for this method. | 
| includeSoftDeletes | boolean | No | false | Set to trueto include soft-deleted records in the queries that this method runs. | 
// Update the `published` and `publishedAt` properties for all records that have `published=0`  
recordsUpdated = model("post").updateAll( published=1, publishedAt=Now(), where="published=0" );
// If you have a `hasMany` association setup from `post` to `comment`, you can do a scoped call. (The `removeAllComments` method below will call `model("comment").updateAll(postid="", where="postId=#post.id#")` internally.)  
post = model("post").findByKey(params.postId);
post.removeAllComments();