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 )



85.4k

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