Yes, now I see that these methods always return boolean values.
But the comment "If the record already exists we must throw an exception" means "add an errorMessage to the model and return false"
Handling "errors" with the return value and getMessages () instead of catching PDOExceptions is nice, but the price is an additional query for each INSERT / UPDATE using save().
IMHO is not the philosophy that the Phalcon's ORM should follow but that's just my opinion.
The point is when I want to INSERT a row with a explicit PK id, the resulting SQL does two "rowcount" and then an insert:
https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/mvc/model.zep#L2923
function create()
{
if (SELECT COUNT(*) "rowcount"....) return false
else this->save()
}
https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/mvc/model.zep#L2743
function save()
{
if (SELECT COUNT(*) "rowcount"....)
self::OP_UPDATE
else
self::OP_INSERT
create() and update() checks if the row exists, then both call save() anyways where again checks if the row exists, so better just call save() in this situation
The other alternative (within the framework) would be using PHQL
Thanks :)