-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
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
ObjectHydrator::getEntityFromIdentityMap() does not work with backed enum #10334
Labels
Comments
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 10, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix call `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 10, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 10, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 10, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 10, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 10, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 11, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 14, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Feb 20, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Gwemox
added a commit
to Gwemox/orm
that referenced
this issue
Apr 3, 2023
When an entity have a backed enum as identifier, `UnitOfWork` tries to cast to string when generating the hash of the id. This fix calls `->value` when identifier is a `BackedEnum`. Fixes doctrine#10471 Fixes doctrine#10334
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: