Skip to content

Fix joining with an inherited property from another table for Linq provider #2581

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

Merged
merged 2 commits into from
Oct 14, 2020

Conversation

maca88
Copy link
Contributor

@maca88 maca88 commented Oct 11, 2020

Fix for a regression made by #2327. When merging into master only the test cases should be merged as #2361 makes this fix obsolete.

Fixes #2580

@maca88 maca88 changed the title Fix joining an inherited property from another table for Linq provider Fix joining with an inherited property from another table for Linq provider Oct 11, 2020
public bool ContainsBaseMember(JoinClause joinClause)
{
// Visit the join inner key only for entities that have subclasses
if (joinClause.InnerSequence is ConstantExpression constantNode &&
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Constant check seems to be enough as join o2 in db.Mammals.Where(o => o.Pregnant) is not supported.

@fredericDelaporte fredericDelaporte added this to the 5.3.4 milestone Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants