private function resolveOrderName(
        $col,
        Meta $meta,
        $alias = null,
        $defaultOrder = 'ASC',
        &$alreadyResolved = []
    ) {
        list($col, $order) = Query::getOrderDirection($col, $defaultOrder);

        $nameParts = explode(BaseLookup::LOOKUP_SEPARATOR, $col);

        /* @var $targetField Field */
        list(
            $relationField, $targetFields, $alias, $joinList, $paths,
            $meta
            ) = $this->_setupJoins($nameParts, $meta, $alias);

        if ($relationField->isRelation && $meta->getOrderBy() &&
            empty($relationField->getAttrName())) {
            throw new NotImplemented(
                'This capability is yet to be implemented'
            );
        }

        list($targets, $alias, $joinList) = $this->query->trimJoins(
            $targetFields,
            $joinList,
            $paths
        );

        $fields = [];

        $descending = ('DESC' == $order) ? true : false;

        // convert the names to expressions

        /** @var $target Field */
        foreach ($targets as $target) {
            $fields[] = [
                new OrderBy($target->getColExpression($alias), $descending),
                false,
            ];
        }

        return $fields;
    }