private function getMetaAndAliases()
    {
        $arr = explode('.', $this->field);
        $meta = $this->getClassMetadata();
        $metaAnterior = [];
        $parent = '';
        $alias = '';

        for ($i = 0; $i <= $this->position; $i++) {
            $metaAnterior = $meta;

            if ($meta->hasAssociation($arr[$i])) {
                $class = $meta->getAssociationTargetClass($arr[$i]);
            } elseif (count($meta->subClasses) > 0) {
                $temp = $this->getSubClassFields($meta, $arr[$i]);
                if (!empty($temp['meta'])) {
                    $class = $temp['table'];
                }
            }

            $meta = $this->em->getClassMetadata($class);

            if ($i < $this->position) {
                $parent .= $parent != '' ? '_' : '';
                $parent .= $arr[$i];
            }
            if ($i == $this->position) {
                $alias .= $parent;
                $alias .= $parent != '' ? '_' : '';
                $alias .= $arr[$i];
            }
        }

        if ($parent == '' && $alias != '') {
            $parent = self::DEFAULT_TABLE_ALIAS;
        }
        if ($alias == '') {
            $alias = self::DEFAULT_TABLE_ALIAS;
        }

        return [
            'meta'        => $meta,
            'parentMeta'  => $metaAnterior,
            'alias'       => $alias,
            'parentAlias' => $parent,
        ];
    }