Explorar o código

[Tree] AbstractTreeRepository: childCount method should reset "orderBy" part, and not "orderby"

comfortablynumb %!s(int64=12) %!d(string=hai) anos
pai
achega
acf55c63a4

+ 2 - 2
lib/Gedmo/Tree/Entity/Repository/AbstractTreeRepository.php

@@ -107,8 +107,8 @@ abstract class AbstractTreeRepository extends EntityRepository implements Reposi
 
 
         // We need to check first if there's an ORDER BY DQL part, because resetDQLPart doesn't
         // We need to check first if there's an ORDER BY DQL part, because resetDQLPart doesn't
         // check if its internal array has an "orderby" index
         // check if its internal array has an "orderby" index
-        if (isset($dqlParts['orderby'])) {
-            $qb->resetDQLPart('orderby');
+        if (isset($dqlParts['orderBy'])) {
+            $qb->resetDQLPart('orderBy');
         }
         }
 
 
         $aliases = $qb->getRootAliases();
         $aliases = $qb->getRootAliases();