Articles tagged with "aftersavefailed"

Detecting duplicate entries when updating

By Ben XO
Cake doesn't tell you the difference between an Model->save() that fails because of a validation error, and one that fails because of key constraint violation (that is, a duplicate entry). Here, I will show you an easy way to overcome this. (MySQL specific)
[Read more]