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