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

Cannot apply OfType on subquery results #16217

Closed
roji opened this issue Jun 24, 2019 · 0 comments · Fixed by #16996
Closed

Cannot apply OfType on subquery results #16217

roji opened this issue Jun 24, 2019 · 0 comments · Fixed by #16996
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@roji
Copy link
Member

roji commented Jun 24, 2019

The following fails with: EntityProjectionExpression: Cannot update EntityType when _innerTable is null

public virtual void Subquery_OfType()
{
    using (var context = CreateContext())
    {
        context.Set<Bird>()
            .Take(5)
            .Distinct()  // Causes pushdown
            .OfType<Kiwi>()
            .ToList();
    }
}

Discovered as part of #16127 (comment)

@ajcvickers ajcvickers added this to the 3.0.0 milestone Jun 24, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview7 Jul 2, 2019
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 6, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview9 Aug 21, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview9, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants