Order.cfc
model file:afterValidation("afterValidation")
.afterValidation
, unintentionally overrode an internal CFWheels method.)calculateShippingCost
or fixCreditCard
as shown in the example above.false
from your callback method. (Otherwise, always return true
or 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.checkSomething
method will be executed first, and unless it returns false
, the checkSomethingElse
method will be executed directly afterward.this
scope in the query object. Instead of modifying properties in the this
scope like you normally would, the properties are passed to the callback method via the arguments
struct.fullName
property on a hypothetical artist
model.select
argument 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 arguments
scope.setFullName()
method handles the logic to concatenate the names.arguments
struct, otherwise Wheels won't be able to tell that you actually wanted to make any changes to the query.Foo
model but not the Bar
model.instantiate=true
to the updateAll()/ deleteAll() methods.