private function rebuildUidCache()
    {
        $this->hasItemWithoutUid = false;

        /** @var \Tx_Oelib_Model $item */
        foreach ($this as $item) {
            if ($item->hasUid()) {
                $uid = $item->getUid();
                $this->uids[$uid] = $uid;
            } else {
                $this->hasItemWithoutUid = true;
            }
        }
    }