fix: correct count in DQL

This commit is contained in:
Maël Gangloff 2025-11-01 19:11:59 +01:00
parent 2292057c73
commit aca4c9f23d
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629

View File

@ -19,16 +19,16 @@ class DomainPurchaseRepository extends ServiceEntityRepository
public function countSuccessDomainPurchase(): int
{
return $this->createQueryBuilder('dp')
->select('COUNT(*)')
->where('dp.domainOrderedAt != NULL')
->select('COUNT(dp)')
->where('dp.domainOrderedAt not NULL')
->getQuery()->getSingleScalarResult();
}
public function countFailDomainPurchase(): int
{
return $this->createQueryBuilder('dp')
->select('COUNT(*)')
->where('dp.domainOrderedAt == NULL')
->select('COUNT(dp)')
->where('dp.domainOrderedAt is NULL')
->getQuery()->getSingleScalarResult();
}
}