We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

ConstraintViolation problem on soft delete

Hello , I'm tryng to use soft delete and it works for any models, but at the last model that I test show me this error msg: I have relation hasOne with other model, but whats the matter?

Phalcon\Mvc\Model\Message Object ( [_type:protected] => ConstraintViolation [_message:protected] => Record is referenced by model \Modules\Admin\Models\Options\EndpointType [_field:protected] => endpoint_type [_model:protected] => [_code:protected] => 0 )



98.9k

It means the record you're trying to delete is being used in another model. As as is trying to delete the record, the behavior probably is misconfigured