Hi, I have this code in my model:
protected function beforeCreate() {
$subs = $this->findFirst("user_id = $this->user_id AND to_id = $this->to_id AND type = $this->type");
if ($subs)
$this->skipOperation(true);
}
And it really checks to see if such a record already and call skipOperation(); Nevertheless, the operation is still running.
What am I doing wrong?