Bug Report
Binding DQL query parameters to entities with primary key being mapped with a custom DBAL type does not lead to the identifiers being passed through the DBAL type conversion when the query is executed.
| Q |
A |
| BC Break |
no |
| Version |
2.7.3 |
Summary
Given:
class MyRot13Type extends Type { ... }
and
class MyEntity {
private Rot13Value $id;
}
When calling:
$entity = new MyEntity();
$em->persist($entity);
$em->flush();
assert(
null !== $em->createQuery('SELECT e FROM MyEntity e WHERE e = :id')
->setParameter('id', $entity)
->getOneOrNullResult()
);
Current behavior
The above will report zero results.
Expected behavior
The above should report one result