public function buildSordOrders(ContainerConfigurationInterface $containerConfig, array $orders)
    {
        $sortOrders = [];
        $mapping    = $containerConfig->getMapping();

        $orders = $this->addDefaultSortOrders($orders, $mapping);

        foreach ($orders as $fieldName => $sortOrderParams) {
            $factory = $this->standardOrderFactory;

            try {
                $sortField       = $mapping->getField($fieldName);
                $sortOrderParams = $this->getSortOrderParams($sortField, $sortOrderParams);

                if (isset($sortOrderParams['nestedPath'])) {
                    $factory = $this->nestedOrderFactory;
                }

                if (isset($sortOrderParams['nestedFilter'])) {
                    $nestedFilter = $this->queryBuilder->create(
                        $containerConfig,
                        $sortOrderParams['nestedFilter'],
                        $sortOrderParams['nestedPath']
                    );
                    $sortOrderParams['nestedFilter'] = $nestedFilter;
                }
            } catch (\LogicException $e) {
                $sortOrderParams['field'] = $fieldName;
            }

            $sortOrders[] = $factory->create($sortOrderParams);
        }

        return $sortOrders;
    }