Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

SoftDelete bug?

I use SoftDelete in a model, I have two records in a Mysql database table. First with id=1, and another id=2 , Memeber::findFirst(2)->delete() is success, But Memeber::findFirst(1)->delete() is failing. I don't know why? Please help me,Thanks!

model codes:

const MEMBER_DELETED = -1;
const MEMBER_LOCKED = 0;
const MEMBER_NORMAL = 1;

public function initialize()
{        
    $this->addBehavior(new SoftDelete(
            array(
                'field' => 'status',
                'value' => ExtMember::MEMBER_DELETED
            )
     ));
}

PHP5.4.30 Phalcon 1.3.2 mysql 5.5.36



1.2k
Accepted
answer
edited Sep '14

I find it It's because of validation, email has an error