I use doctrine to fetch data from the database. In my repository, I build the query
createQueryBuilder('p')
->select('p, bc, cp')
->innerJoin('p.customer', 'bc')
->innerJoin('bc.person', 'cp')
It works well for me, I get the data. But how can I say to doctrine to give me not all fields, but only certain fields, like p.id, p.name, cp.firstname etc?
Thank's for your answers.