For example, I would like to skip the password column while updating if the condition of password input is empty.
CREATE TABLE user
( id VARCHAR NOT NULL PRIMARY KEY,
name VARCHAR NOT NULL,
password VARCHAR NOT NULL
);
class User extends Phalcon\Mvc\Model
{ public $id;
public $name;
public $password;
public function beforeUpdate() {
if(isEmpty($this->password)){
//skip $this->password;
}
}
}