wybranie pola z relacji w symfony

public function getRejectedInstitutionsIdsForClientByInstitutionsIdsAndDate(Client $client, array $institutionsIds, \DateTime $dateTime): array {
        $query = $this->createQueryBuilder('cis')
                        ->select('IDENTITY(cis.institution)')
                        ->andWhere('cis.client = :client')->setParameter('client', $client)
                        ->andWhere('cis.institution IN (:institutions)')->setParameter('institutions', $institutionsIds)
                        ->andWhere('cis.date_of_possible_next_serve >= :date_of_possible_next_serve')->setParameter('date_of_possible_next_serve', $dateTime);

        $result = $query->getQuery()->getResult();

        return array_map(function($value) {
            return $value['1'];
        }, $result);
}
Komentarze wyłączone