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

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



2.3k
Accepted
answer
edited Sep '14

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