Hello!
I am working on a Phalcon project (of course!) and have been dealing with models, I don't know how to handle the database errors, though.
if (!$user->save()) {
//
}
Code like this (^) is supposed to handle all errors, like? but the foreign key violations lead to errors like:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[email protected]' for key 'email'