Open fmonts opened 1 week ago
Found a working solution, but it looks like a workaround:
$ids = array_map(fn($uuid) => Uuid::fromString($uuid)->toBinary(), $ids);
$leads = $this->em->getRepository(Lead::class)->createQueryBuilder('l')
->where('l.uuid IN (:ids)')
->setParameter('ids', $ids, ArrayParameterType::BINARY)
It seems we are currently unable to query by an array of Uuids.
Neither
nor
work. Tested with Mysql 8.0.36. They are sent to db as strings, with the dashes included:
Tried with both strings and Uuid objects.
The
findOneBy
method works: