Return to v2.1 docs

updateProperty()


Model Object CRUD Functions boolean model


Updates a single property and saves the record without going through the normal validation procedure. This is especially useful for boolean flags on existing records.

Name Type Required Default Description
property string No Name of the property to update the value for globally.
value any No Value to set on the given property globally.
parameterize any No true Set to true to use cfqueryparam on all columns, or pass in a list of property names to use cfqueryparam on those only.
transaction string No [runtime expression] Set this to commit to update the database, rollback to run all the database queries but not commit them, or none to skip transaction handling altogether.
callbacks boolean No true Set to false to disable callbacks for this method.
// Sets the `new` property to `1` through updateProperty()
product = model("product").findByKey(56);
product.updateProperty("new", 1);

Related Functions

CRUD Functions