Model Configuration
ignoredColumns()
Signature
Section titled “Signature”ignoredColumns() — returns void
Available in: model
Category: Miscellaneous Functions
Description
Section titled “Description”Use this method to specify which columns cannot be used by the wheels ORM.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
columns | array | no | [runtime expression] | Array of columns names that will be ignored. |
Examples
Section titled “Examples”// 1. Ignore a single column in the model's config() method
// In app/models/User.cfc
component extends="Model" {
function config() {
ignoredColumns(columns=["legacyField"]);
}
}
// 2. Ignore multiple columns so they are excluded from Wheels ORM property mapping
// In app/models/Product.cfc
component extends="Model" {
function config() {
ignoredColumns(columns=["internalCode", "deprecatedFlag", "tempCache"]);
}
}