Skip to content
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

Make ReflectionEnumProperty::getValue() return the enum #10131

Closed
wants to merge 1 commit into from

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Oct 13, 2022

UoW compares orig and actual value. Orig value is the enum. But without this change, actual value is the inner value of the BackedEnum. Therefore, Entities with enum field are always considered a change.

So I though about it like this:

  1. the orig and actual values MUST be enums so they're comparable – implies that property must return enum as a value and not the backed value.
  2. I've found out the enumType is not filled when hydrating entity.

Resolves #10124, #10125.

UoW compares orig and actual value. Orig value is the enum. But without this change, actual value is the inner value of the BackedEnum. Therefore, Entities with enum field are always considered a change.
@simPod simPod changed the title Make ReflectionEnumProperty::getValue return the enum Make ReflectionEnumProperty::getValue() return the enum Oct 13, 2022
@simPod
Copy link
Contributor Author

simPod commented Oct 13, 2022

Maybe I'm fighting against 10074

@simPod simPod closed this Oct 13, 2022
@simPod simPod deleted the enum-changeset branch October 19, 2022 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UnitOfWork calculates change set for enum value when the value stays the same
1 participant