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

Query: Navs: Compiler exception when projecting nav through GroupJoin #7652

Closed
anpete opened this issue Feb 17, 2017 · 1 comment
Closed

Comments

@anpete
Copy link
Contributor

anpete commented Feb 17, 2017

Query:

from c in context.Set<Customer>()
join o in context.Set<Order>().Select(o => o.Customer)
   on c.CustomerID equals o.CustomerID into g
where c.CustomerID == "ALFKI"
select new { c, g }

Stack:

System.InvalidOperationException : variable 'o.Customer' of type 'Microsoft.EntityFrameworkCore.Specification.Tests.TestModels.Northwind.Customer' referenced from scope '', but it is not defined
	at System.Linq.Expressions.Compiler.VariableBinder.Reference(ParameterExpression node, VariableStorageKind storage)
	at System.Linq.Expressions.Compiler.VariableBinder.VisitParameter(ParameterExpression node)
	at System.Linq.Expressions.ParameterExpression.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes)
	at System.Linq.Expressions.Compiler.VariableBinder.VisitLambda[T](Expression`1 node)
	at System.Linq.Expressions.Expression`1.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.ExpressionVisitor.VisitArguments(IArgumentProvider nodes)
	at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
	at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.ExpressionVisitor.VisitArguments(IArgumentProvider nodes)
	at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
	at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.ExpressionVisitor.VisitArguments(IArgumentProvider nodes)
	at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
	at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.ExpressionVisitor.VisitArguments(IArgumentProvider nodes)
	at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
	at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.ExpressionVisitor.VisitArguments(IArgumentProvider nodes)
	at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
	at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes)
	at System.Linq.Expressions.Compiler.VariableBinder.VisitLambda[T](Expression`1 node)
	at System.Linq.Expressions.Expression`1.Accept(ExpressionVisitor visitor)
	at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
	at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator)
	at System.Linq.Expressions.Expression`1.Compile()
	at Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor.CreateExecutorLambda[TResults]()
@rowanmiller rowanmiller added this to the 2.0.0 milestone Feb 22, 2017
@ajcvickers ajcvickers modified the milestones: 2.0.0-preview1, 2.0.0 Apr 19, 2017
@maumar maumar closed this as completed May 23, 2017
@maumar maumar reopened this May 23, 2017
@maumar maumar modified the milestones: Backlog, 2.0.0 Jul 5, 2017
@ajcvickers ajcvickers changed the title Navs: Compiler exception when projecting nav through GroupJoin Query: Navs: Compiler exception when projecting nav through GroupJoin May 16, 2018
@smitpatel
Copy link
Contributor

smitpatel commented Sep 4, 2019

Duplicate of #17068

@smitpatel smitpatel marked this as a duplicate of #17607 Sep 4, 2019
@smitpatel smitpatel marked this as a duplicate of #17068 Sep 4, 2019
@smitpatel smitpatel marked this as not a duplicate of #17607 Sep 4, 2019
@smitpatel smitpatel removed this from the Backlog milestone Sep 4, 2019
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants