Miscellaneous
accessibleProperties()
Signature
Section titled “Signature”accessibleProperties() — returns any
Description
Section titled “Description”Use this method to specify which properties can be set through mass assignment.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
properties | string | yes | — | Property name (or list of property names) that are allowed to be altered through mass assignment. |
Examples
Section titled “Examples”accessibleProperties([ properties ]) <!--- In `models/User.cfc`, only `isActive` can be set through mass assignment operations like `updateAll()` --->
<cffunction name="init">
<cfset accessibleProperties("isActive")>
</cffunction>