private function addSorting($qb, $sorting, $prefix = 'u')
    {
        // Add order by
        foreach ($sorting as $k => $d) {
            $qb->addOrderBy($prefix . '.' . $k, $d);
        }

        return $qb;
    }