Cannot bind uuid_binary type to Doctrine's QueryBuilder
subdee opened this issue · comments
Description
A BINARY type does not seem to be supported in doctrine now.
If I bind the binary representation of the ID in a param I get an error from the ORM.
This is the parameter:
->setParameter(':column', $entity->getId()->getBytes())
and the error is Unhandled match case 16
which is coming from this method in doctrine/orm and is simply missing a match for ParameterType::BINARY
.
Adding the type explicitly results in the same error.
doctrine/orm: 3.1.3
doctrine/dbal: 3.8.4
ramsey/uuid-doctrine: 2.0.0
Edit: The above worked fine with
doctrine/orm: 2.19.4
doctrine/dbal: 3.8.3
ramsey/uuid-doctrine: 1.8.2
where the above method does not exist
Steps to reproduce
Use the QueryBuilder to retrieve data based on a foreign key with uuid_binary type
Expected behavior
To get the right data back from the database
Screenshots or output
Error is Unhandled match case 16
Environment details
doctrine/orm: 3.1.3
doctrine/dbal: 3.8.4
ramsey/uuid-doctrine: 2.0.0
Additional context
Can confirm. This renders doctrine v3 not yet usable when the project is using uuids.
This might be very similar to doctrine/orm#11090
But breaks as well on the ManyToOne side (the mentioned MR solves the opposite OneToMany)