Return to v1.4.5 docs

updateProperties()



Updates all the properties from the properties argument or other named arguments. If the object is invalid, the save will fail and false will be returned.

Name Type Required Default Description
properties struct No [runtime expression] Struct containing key/value pairs with properties and associated values that need to be updated 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.
validate boolean No Set to false to skip validations for this operation.
transaction string No [runtime expression] Set this to commit to update the database when the save has completed, 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 operation.
updateProperties([ properties, parameterize, validate, transaction, callbacks ]) <!--- Sets the `new` property to `1` through `updateProperties()` --->
<cfset product = model("product").findByKey(56)>
<cfset product.updateProperties(new=1)>