public function getAll(...$args)
    {
        $pkey = $this->getPrimaryKey();

        if (count($pkey) === 1)
        {
            reset($pkey);
            $pkey_as_index = key($pkey);
        }
        else
            $pkey_as_index = false;

        $list = array();
        $records = $this->fetchAll($args);
        foreach ($records as $record)
        {
            $obj = new $this->model_class;
            $obj->assignRecord($record, $this->db);

            if ($pkey_as_index)
                $list[$obj->getField($pkey_as_index)] = $obj;
            else
                $list[] = $obj;
        }
        return $list;
    }