Whatever message this page gives is out now! Go check it out!

Generated accessors

Last update:
May 18, 2026
As described in  Define ORM mapping , the persistent fields for an object are defined in the CFC using cfproperty. ColdFusion generates the accessor methods (getter and setter) for each property in the CFC that can be invoked. For more information, see Implicit Get and Set Functions in  Functions . For example, if a property is defined in Artist as follows:
<cfproperty name="firstName" >
There are two methods generated in the Artist object:
  • setFirstName ( firstName )
  • getFirstName () You can invoke these methods like regular methods in the CFC. For a property, the generated setter saves the value for the property in the object's VARIABLES scope. The generated getter retrieves the value of the property from the VARIABLES scope. ORM always uses the property value from the VARIABLES scope. That is, while saving the object's data in the table, ORM retrieves the value of the property from VARIABLES scope. While populating the object after reading from the table, ORM puts the property's value in the VARIABLES scope.If you define your own accessor methods for a property, store the property value in the VARIABLES scope for ORM to access it.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page