mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Regulation list: serach by exact postal code, and not the postal code's string content
This commit is contained in:
@@ -79,11 +79,10 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin
|
||||
Join::WITH,
|
||||
'COALESCE(IDENTITY(person_address.address), IDENTITY(location_history.addressLocation)) = address.id'
|
||||
)
|
||||
->join('address.postcode', 'postcode')
|
||||
->andWhere(
|
||||
$qb->expr()->in('postcode.code', ':postal_codes')
|
||||
$qb->expr()->in('address.postcode', ':postal_codes')
|
||||
)
|
||||
->setParameter('postal_codes', array_map(fn (PostalCode $postalCode) => $postalCode->getCode(), $postalCodes));
|
||||
->setParameter('postal_codes', $postalCodes);
|
||||
}
|
||||
|
||||
return $qb;
|
||||
|
Reference in New Issue
Block a user