Search code examples
coldfusioncfwheels

cfwheels, getting errors from an unsuccessful model update


I'm trying to update a model with nested properties after an edit.

The update fails, but I'm not getting any errors using #errorMessagesFor(objectName='myobject')#.

Any idea how to get to the cause?


Solution

  • I would use the allErrors() method on each of the objects in the array.

    for (local.object in myObject.arrayOfObjects) {
        if (local.object.hasErrors()) {
            WriteDump(var=local.object.allErrors(), abort=true);
        }
    }