afterValidation, unintentionally overrode an internal CFWheels method.)
fixCreditCardas shown in the example above.
falsefrom your callback method. (Otherwise, always return
trueor nothing at all.) As an example of breaking the callback chain, let's say you have called the save() method on a new object and the method you've registered with the beforeCreate() callback returns
false. As a result, because the method you've registered with the beforeCreate() callback will exit the callback chain early by returning
false, no record will be inserted in the database.
checkSomethingmethod will be executed first, and unless it returns
checkSomethingElsemethod will be executed directly afterward.
thisscope in the query object. Instead of modifying properties in the
thisscope like you normally would, the properties are passed to the callback method via the
fullNameproperty on a hypothetical
selectargument on a finder to limit the number of columns returned. But no worries! You can use
StructKeyExists()and perform a simple check to make sure that the columns exists in the
setFullName()method handles the logic to concatenate the names.
argumentsstruct, otherwise Wheels won't be able to tell that you actually wanted to make any changes to the query.
Foomodel but not the