isJoinUserMerchants) { $this->isJoinUserMerchants = true; return $this ->innerJoin('.userMerchants', 'um'); } return $this; } public function filterMerchantIsActive(): self { $this->joinUserMerchants(); return $this ->andWhere('um.active = 1'); } public function filterByMerchant(Merchant $merchant): self { $this->joinUserMerchants(); return $this ->andWhere('um.merchant = :merchant') ->setParameter('merchant', $merchant); } }