mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix query : was missing parenthesis.
This commit is contained in:
parent
b9890d1302
commit
044bab45ad
@ -20,6 +20,7 @@ use Chill\MainBundle\Form\Type\PickRollingDateType;
|
|||||||
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
use Chill\MainBundle\Service\RollingDate\RollingDate;
|
||||||
use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
|
use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||||
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
|
||||||
use Chill\PersonBundle\Export\Declarations;
|
use Chill\PersonBundle\Export\Declarations;
|
||||||
use Doctrine\DBAL\Types\Types;
|
use Doctrine\DBAL\Types\Types;
|
||||||
@ -46,16 +47,14 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf
|
|||||||
|
|
||||||
$qb
|
$qb
|
||||||
->andWhere(
|
->andWhere(
|
||||||
$qb->expr()->andX(
|
|
||||||
$qb->expr()->exists(
|
$qb->expr()->exists(
|
||||||
"SELECT 1 FROM ".AccompanyingPeriodParticipation::class." {$p}_acp ".
|
"SELECT 1 FROM ".AccompanyingPeriodParticipation::class." {$p}_acp JOIN {$p}_acp.accompanyingPeriod {$p}_acpp ".
|
||||||
"WHERE {$p}_acp.person = person ".
|
"WHERE {$p}_acp.person = person ".
|
||||||
"AND OVERLAPSI ({$p}_acp.openingDate, {$p}_acp.closingDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE"),
|
"AND OVERLAPSI({$p}_acp.startDate, {$p}_acp.endDate), (:{$p}_date_after, :{$p}_date_before) = TRUE ".
|
||||||
$qb->expr()->exists(
|
"AND OVERLAPSI({$p}_acpp.openingDate, {$p}_acpp.closingDate), (:{$p}_date_after, :{$p}_date_before) = TRUE")
|
||||||
'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acpp ".
|
|
||||||
"WHERE {$p}_acpp.person = person ".
|
|
||||||
"AND OVERLAPSI ({$p}_acpp.startDate, {$p}_acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE")
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
->setParameter("{$p}_date_after", $this->rollingDateConverter->convert($data['date_after']), Types::DATE_IMMUTABLE)
|
->setParameter("{$p}_date_after", $this->rollingDateConverter->convert($data['date_after']), Types::DATE_IMMUTABLE)
|
||||||
->setParameter("{$p}_date_before", $this->rollingDateConverter->convert($data['date_before']), Types::DATE_IMMUTABLE);
|
->setParameter("{$p}_date_before", $this->rollingDateConverter->convert($data['date_before']), Types::DATE_IMMUTABLE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user