Miscellaneous
columnForProperty()
Signature
Section titled “Signature”columnForProperty() — returns any
Description
Section titled “Description”Returns the column name mapped for the named model property.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
property | string | yes | — | Name of property to inspect. |
Examples
Section titled “Examples”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 --->