N°4232 - Order By error on query with two classes

This commit is contained in:
acognet
2021-08-16 09:53:19 +02:00
parent 8e3cc471df
commit 9d28e43804
3 changed files with 34 additions and 26 deletions

View File

@@ -343,8 +343,8 @@ class AjaxRenderController
$sIdName = $sAlias."/_key_";
}
if ($iSortCol == $iSortIndex) {
if (!MetaModel::HasChildrenClasses($oFilter->GetClass())) {
$aNameSpec = MetaModel::GetNameSpec($oFilter->GetClass());
if (!MetaModel::HasChildrenClasses($sClassName)) {
$aNameSpec = MetaModel::GetNameSpec($sClassName);
if ($aNameSpec[0] == '%1$s') {
// The name is made of a single column, let's sort according to the sort algorithm for this column
$aOrderBy[$sAlias.'.'.$aNameSpec[1][0]] = ($sSortOrder == 'asc');