public static function getOne($id, $fields = null)
    {
        $table = self::getTableNameFromClass();

        if ($fields != null && is_array($fields)) {
            $query = "SELECT ". implode(', ', $fields) ." FROM $table WHERE id = $id";
        } else {
            $query = "SELECT * FROM $table WHERE id = $id";
        }

        $res = [];

        $results = Connection::db()->query($query);
        $results->setFetchMode(PDO::FETCH_ASSOC);

        while ($row = $results->fetch()) {
            array_push($res, $row);
        }

        if (!empty($res)) {
            return $res;
        } else {
            throw new PotatoException('There is no user with id '. $id);
        }
    }