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

[6.0] Use correct value comparer for generated FK properties #26240

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

ajcvickers
Copy link
Member

Fixes #26116

Initial issue was that the converted type also required a comparer. On adding one it revealed that in this case a default comparer was being used for the dependent map in the state manager. Fix is to use the PK comparer in the same was as we use the PK converter.

Added more testing for similar cases including generated shadow FKs.

Fixes #26116

Initial issue was that the converted type also required a comparer. On adding one it revealed that in this case a default comparer was being used for the dependent map in the state manager. Fix is to use the PK comparer in the same was as we use the PK converter.

Added more testing for similar cases including generated shadow FKs.
@ajcvickers ajcvickers requested a review from a team October 3, 2021 13:42
@ajcvickers
Copy link
Member Author

@Pilchie for 6.0. We enabled more scenarios where keys can use value converters in 6.0, so this is essentially a bug in a new feature. Product change is small; most of the code here is new tests.

@Pilchie
Copy link
Member

Pilchie commented Oct 4, 2021

Approved for EFCore 6.0 GA.

@ajcvickers ajcvickers merged commit 37fa3e4 into release/6.0 Oct 4, 2021
@ajcvickers ajcvickers deleted the UnionTown0930 branch October 4, 2021 16:38
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.

Owned entity not loaded if PK has a value converter
3 participants