protected function _mapAliases() {
        return $this->cache(__METHOD__, function() {
            $query = $this->getQuery();

            if (!$query) {
                return [];
            }

            $alias = $query->getAlias();
            $map = [
                $query->getTable() => $alias,
                strtolower($alias) => $alias
            ];

            foreach ($query->getJoins() as $join) {
                $joinAlias = $join->getAlias();

                $map[$join->getTable()] = $joinAlias;
                $map[strtolower($joinAlias)] = $joinAlias;
            }

            return $map;
        });
    }