private function getOrderBy($prefix)
    {
        $result = '';
        // If sorting is defined
        if (null != $this->sorting && count($this->sorting) > 0) {
            $orderBy = '';
            // TODO OrderBy relations translations_value
            foreach ($this->sorting as $col => $dir) {
                if (strlen($orderBy) > 0) {
                    $orderBy .= ', ';
                }
                $orderBy .= $prefix . '.' . $col . ' ' . $dir;
            }
            $result .= '
                ORDER BY ' . $orderBy;
        }

        return $result;
    }