public function removeDislike($userId) { if ($this->dislikes >= 1) { $this->dislikes--; $this->save(); VideoVote::delete_all(array('conditions' => array('user_id = ? and obj_id = ?', $userId, $this->id))); } }