protected function prepareKeys($forGet = true)
    {
        $queryKeys = $this->queryBuilder->getQueryKeys();

        // Caution! Would get all items.
        if (!$queryKeys) {
            $queryKeys = [$this->key];
        }

        $existKeys = $this->getExistKeys($queryKeys);

        if ($forGet) {
            $this->setOrderByFieldIndices();

            if ($this->orderByFieldIndices) {
                uasort($existKeys, [$this, 'sortByFields']);
            }

            if ($this->offset || $this->limit) {
                $existKeys = array_slice($existKeys, (int)$this->offset, $this->limit);
            }
        }

        return $existKeys;
    }