From cb47d34ed0c67009b12d4978e5dbc34d427b570b Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 23 Aug 2016 22:47:01 +0200 Subject: [PATCH] Fixed ololoshke_trololoshke alias at count table name Renamed 'ololoshke_trololoshke' alias at count table name to 'dbal_count_tbl' in DBAL Query Builder Subscriber. This fixes #123 Scary "ololoshke_trololoshke" at the end of some queries. It makes easier understanding of query log. --- .../Paginate/Doctrine/DBALQueryBuilderSubscriber.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/DBALQueryBuilderSubscriber.php b/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/DBALQueryBuilderSubscriber.php index 5f5da264..821fcb86 100644 --- a/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/DBALQueryBuilderSubscriber.php +++ b/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/DBALQueryBuilderSubscriber.php @@ -27,7 +27,7 @@ public function items(ItemsEvent $event) $qb ->resetQueryParts() ->select('count(*) as cnt') - ->from('(' . $sql . ')', 'ololoshke_trololoshke') + ->from('(' . $sql . ')', 'dbal_count_tbl') ; $event->count = $qb @@ -60,4 +60,4 @@ public static function getSubscribedEvents() 'knp_pager.items' => array('items', 10 /*make sure to transform before any further modifications*/) ); } -} +}