accessibleProperties()

Use this method to specify which properties can be set through mass assignment.

Name Type Required Default Description
properties string No Property name (or list of property names) that are allowed to be altered through mass assignment.
// Make `isActive` the only property that can be set through mass assignment operations like `updateAll()`.
config() {
	accessibleProperties("isActive");
}
Copied!

addColumn()

adds a column to existing table Only available in a migration CFC

Name Type Required Default Description
table string Yes The Name of the table to add the column to
columnType string Yes The type of the new column
columnName string Yes THe name of the new column
afterColumn string No The name of the column which this column should be inserted after
referenceName string No Name for new reference column, see documentation for references function, required if columnType is 'reference'
default string No Default value for this column
null boolean No Whether to allow NULL values
limit numeric No Character or integer size limit for column
precision numeric No precision value for decimal columns, i.e. number of digits the column can hold
scale numeric No scale value for decimal columns, i.e. number of digits that can be placed to the right of the decimal point (must be less than or equal to precision)
addColumn(table='members', columnType='string', columnName='status', limit=50);
Copied!

addError()

Adds an error on a specific property.

Name Type Required Default Description
property string Yes The name of the property you want to add an error on.
message string Yes The error message (such as "Please enter a correct name in the form field" for example).
name string No A name to identify the error by (useful when you need to distinguish one error from another one set on the same object and you don't want to use the error message itself for that).
// Add an error to the `email` property.
this.addError(property="email", message="Sorry, you are not allowed to use that email. Try again, please.");
Copied!

addErrorToBase()

Adds an error on a specific property.

Name Type Required Default Description
message string Yes The error message (such as "Please enter a correct name in the form field" for example).
name string No A name to identify the error by (useful when you need to distinguish one error from another one set on the same object and you don't want to use the error message itself for that).
// Add an error on the object that's not specific to a single property.
this.addErrorToBase(message="Your email address must be the same as your domain name.");
Copied!

addForeignKey()

Add a foreign key constraint to the database, using the reference name that was used to create it Only available in a migration CFC

Name Type Required Default Description
table string Yes The table name to perform the operation on
referenceTable string Yes The reference table name to perform the operation on
column string Yes The column name to perform the operation on
referenceColumn string Yes The reference column name to perform the operation on
All

accessibleProperties()

addColumn()

addError()

addErrorToBase()

addForeignKey()

addFormat()

addIndex()

addRecord()

addReference()

afterAll()

afterCreate()

afterDelete()

afterFind()

afterInitialization()

afterNew()

afterSave()

afterUpdate()

afterValidation()

afterValidationOnCreate()

afterValidationOnUpdate()

allChanges()

allErrors()

announce()

assert()

authenticityToken()

authenticityTokenField()

autoLink()

automaticValidations()

average()

beforeAll()

beforeCreate()

beforeDelete()

beforeSave()

beforeUpdate()

beforeValidation()

beforeValidationOnCreate()

beforeValidationOnUpdate()

belongsTo()

bigInteger()

binary()

boolean()

buttonTag()

buttonTo()

caches()

capitalize()

change()

changeColumn()

changedFrom()

changedProperties()

changeTable()

char()

checkBox()

checkBoxTag()

clearChangeInformation()

clearErrors()

collection()

column()

columnDataForProperty()

columnForProperty()

columnNames()

columns()

compareTo()

constraints()

contentFor()

contentForLayout()

controller()

controller()

count()

create()

create()

createMigration()

createTable()

createView()

csrfMetaTags()

cycle()

dataSource()

date()

dateSelect()

dateSelectTags()

datetime()

dateTimeSelect()

dateTimeSelectTags()

daySelectTag()

debug()

decimal()

delete()

delete()

deleteAll()

deleteByKey()

deleteOne()

deobfuscateParam()

distanceOfTimeInWords()

down()

dropForeignKey()

dropReference()

dropTable()

dropView()

end()

endFormTag()

errorCount()

errorMessageOn()

errorMessagesFor()

errorsOn()

errorsOnBase()

excerpt()

execute()

exists()

fail()

fileField()

fileFieldTag()

filterChain()

filters()

findAll()

findAllKeys()

findByKey()

findFirst()

findLastOne()

findOne()

flash()

flashClear()

flashCount()

flashDelete()

flashInsert()

flashIsEmpty()

flashKeep()

flashKeyExists()

flashMessages()

float()

get()

get()

getAvailableMigrations()

getCurrentMigrationVersion()

getEmails()

getFiles()

getRedirect()

getTableNamePrefix()

hasChanged()

hasErrors()

hasMany()

hasManyCheckBox()

hasManyRadioButton()

hasOne()

hasProperty()

hiddenField()

hiddenFieldTag()

highlight()

hourSelectTag()

humanize()

hyphenize()

imageTag()

includeContent()

includedInObject()

includeLayout()

includePartial()

integer()

invokeWithTransaction()

isAjax()

isClass()

isDelete()

isGet()

isHead()

isInstance()

isNew()

isOptions()

isPatch()

isPersisted()

isPost()

isPut()

isSecure()

javaScriptIncludeTag()

key()

linkTo()

mailTo()

mapper()

maximum()

member()

migrateTo()

migrateToLatest()

mimeTypes()

minimum()

minuteSelectTag()

model()

monthSelectTag()

namespace()

nestedProperties()

new()

obfuscateParam()

onlyProvides()

onMissingMethod()

package()

packageSetup()

packageTeardown()

pagination()

paginationLinks()

passwordField()

passwordFieldTag()

patch()

pluginNames()

pluralize()

post()

primaryKey()

primaryKey()

primaryKeys()

processAction()

processRequest()

properties()

property()

propertyIsBlank()

propertyIsPresent()

propertyNames()

protectedProperties()

protectsFromForgery()

provides()

put()

radioButton()

radioButtonTag()

raised()

redirectTo()

redoMigration()

references()

reload()

removeColumn()

removeIndex()

removeRecord()

renameColumn()

renameTable()

renderNothing()

renderPartial()

renderText()

renderView()

renderWith()

resetCycle()

resource()

resources()

response()

root()

save()

scope()

secondSelectTag()

select()

selectTag()

sendEmail()

sendFile()

set()

setFilterChain()

setPagination()

setPrimaryKey()

setPrimaryKeys()

setProperties()

setResponse()

setTableNamePrefix()

setup()

setVerificationChain()

simpleFormat()

singularize()

startFormTag()

string()

stripLinks()

stripTags()

styleSheetLinkTag()

submitTag()

sum()

table()

tableName()

teardown()

testExample()

text()

textArea()

textAreaTag()

textField()

textFieldTag()

time()

timeAgoInWords()

timeSelect()

timeSelectTags()

timestamp()

timestamps()

timeUntilInWords()

titleize()

toggle()

truncate()

uniqueidentifier()

up()

update()

updateAll()

updateByKey()

updateOne()

updateProperty()

updateRecord()

URLFor()

usesLayout()

valid()

validate()

validateOnCreate()

validateOnUpdate()

validatesConfirmationOf()

validatesExclusionOf()

validatesFormatOf()

validatesInclusionOf()

validatesLengthOf()

validatesNumericalityOf()

validatesPresenceOf()

validatesUniquenessOf()

validationTypeForProperty()

verificationChain()

verifies()

wildcard()

wordTruncate()

yearSelectTag()