mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
ObjectHydrator::getEntityFromIdentityMap() does not work with backed enum #7080
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @noemi-salaun on GitHub (Dec 21, 2022).
Bug Report
Summary
I have an entity with a backed enum as primary key. When I fetch a fresh entity from the database, everything works fine. But if I try to fetch an entity that is already known in the identity map, it fails.
Current behavior
It cannot load an entity with backed enum as primary key from the ObjectHydrator identity map.
From ObjectHydrator on line 292
How to reproduce
We need 2 entities, with ManyToOne relation, so we can use a join in our request.
And then, just run 2 queries to trigger the loading from the identity map
Expected behavior
No error