public function exists($entity, $entity_id, $user_id)
    {
        $sql = 'SELECT history_id FROM history WHERE entity=? AND entity_id=? AND user_id=?';
        return (bool) $this->db->fetchColumn($sql, array($entity, $entity_id, $user_id));
    }