Hydrating enumType
as getArrayResult
gives *string* instead of Enum
#9588
ThomasLandauer
started this conversation in
General
Replies: 2 comments 2 replies
-
Please don't @ people. FWIW, this looks like a bug to me. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I would really like to offer some help on this one, but some internals of Doctrine are still unknown to me. Where should we lead discussion and questions - here, or in the issue? I might have few "stupid" questions, but if you have patience with me, you might get a better contributor from me that way. If this is out of your time capabilities and you wish to fix this yourselves, then I understand. Please let me know |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@derrabus When doing
... with
suit
being anenumType
, the resultingsuit
column in the array is the string value of the Enum's case already (not the case itself).This looks inconsistent to me: Usually, if I switch from
->getResult()
to->getArrayResult()
, I don't have to change anything in the template. But in this case, I have to change{{ f.suit.value }}
to{{ f.suit }}
.If you're telling me that it's going to stay this way, I'll document it at https://www.doctrine-project.org/projects/doctrine-orm/en/2.11/reference/basic-mapping.html
Beta Was this translation helpful? Give feedback.
All reactions