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

Entity equality: fix mis-identification as collection navigation #17447

Merged
merged 1 commit into from
Aug 27, 2019

Conversation

roji
Copy link
Member

@roji roji commented Aug 27, 2019

We now flow the last navigation only for pure traversal (via member, EF.Property) and not for Select and others. This corrects valid entity references which were misidentified as collection navigations.

Fixes #17229

@@ -959,24 +959,15 @@ private Expression CreatePropertyAccessExpression(Expression target, IProperty p
}

private static bool CanEvaluate(Expression expression)
{
switch (expression)
=> expression switch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smitpatel 💔 switch expressions :trollface:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revert, but any specific reason you don't like it here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Involves processing more than mere a single line. Kills readability.

We now flow the last navigation only for pure traversal (via member,
EF.Property) and not for Select and others. This corrects valid
entity references which were misidentified as collection navigations.

Fixes #17229
@roji roji force-pushed the EntityEqualityNavigationFix branch from 3cfd068 to 0b5fb84 Compare August 27, 2019 16:08
@roji roji merged commit 1121f6a into release/3.1 Aug 27, 2019
@ghost ghost deleted the EntityEqualityNavigationFix branch August 27, 2019 16:58
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.

2 participants