Can I use an alias in partial selection? Because I use underscore as a naming convention for variables in the interface and camelCasing in the background.
Here is my doctrine request:
return $this->postingRepo->createQueryBuilder('p') ->select('p.postingId','p.datetimePosted') ->innerJoin('p.user','u') ->addSelect('partial u.{userId as user_id,firstName as first_name,lastName as last_name}')
I have searched many times, but still cannot find the answer. Maybe someone knows how or wants to tell me that this is not possible.
source share