How do we specify fields to return in the result, in zend framework 2 using doctrine 2?
Here is my query:
$allLanguages = $this->getEntityManager()
->getRepository('Language')
->findAll();
I just want ‘name’ field in the result from languages table.
I usually use DQL like this to customize query.
In your case above. It can be somehting like.
Doctrine Query Language DQL
Query Builder