You are viewing documentation for v1.0.x. Change

setProperties()

Description

Allows you to set all the properties of an object at once by passing in a structure with keys matching the property names.

Function Syntax

setProperties([ properties ])

Parameters

Parameter Type Required Default Description
properties struct No [runtime expression] The properties you want to set on the object (can also be passed in as named arguments).

Examples

<!--- update the properties of the object with the params struct containing the values of a form post --->
<cfset user = model("user").findByKey(1)>
<cfset user.setProperties(params)>