I have an entity Offer. Offer has a ManyToMany Relationship to Files. Now I want to have all Offers, that have files -> Count(offer.files) > 0.
I tried it like this, but doesn't work:
$this->repository->createQueryBuilder('offer')
->addSelect('COUNT(offer.files) as files')
->having('files > 1')
->getQuery()
->getResult();
having('SIZE(offer.files) > 1')
directly – Boult