diff --git a/ORM/PaginatedRepository.php b/ORM/PaginatedRepository.php
index <HASH>..<HASH> 100644
--- a/ORM/PaginatedRepository.php
+++ b/ORM/PaginatedRepository.php
@@ -40,9 +40,7 @@ class PaginatedRepository extends EntityRepository
     {
         $qb = $this->createPaginatedQueryBuilder($criteria);
         $qb->addSelect($this->getEntityAlias());
-        if (is_array($orderBy)) {
-            $qb->addOrder($orderBy, $this->getEntityAlias());
-        }
+        $this->processOrderBy($qb, $orderBy);
         $qb->addPagination($page, $rpp);
 
         $results = $qb->getQuery()->getResult();
@@ -100,6 +98,17 @@ class PaginatedRepository extends EntityRepository
     }
 
     /**
+     * @param PaginatedQueryBuilder $qb
+     * @param array|null            $orderBy
+     */
+    protected function processOrderBy(PaginatedQueryBuilder $qb, array $orderBy = null)
+    {
+        if (is_array($orderBy)) {
+            $qb->addOrder($orderBy, $this->getEntityAlias());
+        }
+    }
+
+    /**
      * @return string
      */
     protected function getEntityAlias()
PaginatedRepository move order logic to protected method