Skip to content

Miscellaneous

columnForProperty()

columnForProperty() — returns any

Returns the column name mapped for the named model property.

NameTypeRequiredDefaultDescription
propertystringyesName of property to inspect.
columnForProperty(property) <!--- Get an object, set a value and then see if the property exists --->
<cfset employee = model("employee").new()>
<cfset employee.columnForProperty("firstName")><!--- returns column name, in this case "firstname" if the convention is used --->