We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems we are currently unable to query by an array of Uuids.
Neither
$leads = $this->em->getRepository(Lead::class)->findBy(['uuid' => $uuids]);
nor
$leads = $this->em->getRepository(Lead::class)->createQueryBuilder('l') ->where('l.uuid IN (:uuids)') ->setParameter('uuids', $uuids) ->getQuery() ->getResult();
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:
findOneBy
The text was updated successfully, but these errors were encountered:
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)
Sorry, something went wrong.
No branches or pull requests
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:The text was updated successfully, but these errors were encountered: