I use the following query:
SELECT u.username, u.password, s.name, s.price
FROM AcmeBundle:User u
LEFT JOIN AcmeBundle:Shop s
WITH u.id = s.id;
To display the records I want to paginate. The problem is that pagination required simple count query, and doesn't work with select like this one.
Not all identifier properties can be found in the ResultSetMapping: username
So to paginate it, I would have to always use two queries - the one above to display records, and the other one to count them, both with joins. It dramatically decreses the performance.
I use knplabs paginator, symfony 2 and doctrine ORM.
Can you give me any advices on how to do that?