Skip to content

Fix join on interface in Linq/hql #2810

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 4 commits into from
Jun 9, 2021
Merged

Fix join on interface in Linq/hql #2810

merged 4 commits into from
Jun 9, 2021

Conversation

bahusoid
Copy link
Member

@bahusoid bahusoid commented Jun 3, 2021

Fixes #2805

Regression from #2327 (by using hql entity join in Linq instead of implicit joins)

@@ -570,8 +570,9 @@ public bool ContainsBaseMember(JoinClause joinClause)
{
// Visit the join inner key only for entities that have subclasses
if (joinClause.InnerSequence is ConstantExpression constantNode &&
constantNode.Value is IEntityNameProvider entityNameProvider &&
!_sessionFactory.GetEntityPersister(entityNameProvider.EntityName).EntityMetamodel.HasSubclasses)
constantNode.Value is IEntityNameProvider &&
Copy link
Member Author

Choose a reason for hiding this comment

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

Changes in this file should be ignored when merged to master (5.3 specific fix)

@bahusoid bahusoid changed the title Fix join on interface Fix join on interface in Linq/hql Jun 3, 2021
@bahusoid bahusoid changed the base branch from master to 5.3.x June 3, 2021 09:13
@hazzik hazzik added this to the 5.3.9 milestone Jun 3, 2021
@hazzik hazzik added the t: Fix label Jun 3, 2021
@hazzik hazzik merged commit c53c2e2 into nhibernate:5.3.x Jun 9, 2021
@hazzik hazzik added the r: Fixed label Jun 9, 2021
@bahusoid bahusoid mentioned this pull request Jul 3, 2021
bahusoid added a commit to bahusoid/nhibernate-core that referenced this pull request Aug 10, 2021
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.

Model not mapped Exception
3 participants