Skip to content

Miscellaneous

updateProperties()

updateProperties() — returns any

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.

NameTypeRequiredDefaultDescription
propertiesstructyes[runtime expression]Struct containing key/value pairs with properties and associated values that need to be updated globally.
parameterizeanyyestrueSet to true to use cfqueryparam on all columns, or pass in a list of property names to use cfqueryparam on those only.
validatebooleanyesSet to false to skip validations for this operation.
transactionstringyes[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.
callbacksbooleanyestrueSet 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)>