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

FreeText_through_navigation is broken #18199

Closed
AndriySvyryd opened this issue Oct 3, 2019 · 4 comments · Fixed by #21922
Closed

FreeText_through_navigation is broken #18199

AndriySvyryd opened this issue Oct 3, 2019 · 4 comments · Fixed by #21922
Assignees
Labels
area-query area-test closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@AndriySvyryd
Copy link
Member

AndriySvyryd commented Oct 3, 2019

Also FreeText_through_navigation_with_language_terms and Contains_through_navigation

System.InvalidOperationException : The LINQ expression 'LastOrDefault(Select<TransparentIdentifier<Employee, Employee>, Employee>(
source: Where<TransparentIdentifier<Employee, Employee>>(
source: LeftJoin<Employee, Employee, Nullable, TransparentIdentifier<Employee, Employee>>(
outer: DbSet,
inner: DbSet,
outerKeySelector: (e) => Property<Nullable>(e, "ReportsTo"),
innerKeySelector: (e0) => Property<Nullable>(e0, "EmployeeID"),
resultSelector: (o, i) => new TransparentIdentifier<Employee, Employee>(
Outer = o,
Inner = i
)),
predicate: (e) => FreeText(
_: (Unhandled parameter: __Functions_0),
propertyReference: e.Inner.Title,
freeText: "President") && FreeText(
_: (Unhandled parameter: __Functions_0),
propertyReference: e.Outer.Title,
freeText: "Inside") && e.Outer.FirstName.Contains("Lau")),
selector: (e) => e.Outer))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
Stack Trace:
QueryableMethodTranslatingExpressionVisitor.g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& ) line 51
QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) line 284
RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) line 72
QueryCompilationContext.CreateQueryExecutor[TResult](Expression query) line 68
Database.CompileQuery[TResult](Expression query, Boolean async) line 71
QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async) line 106
<>c__DisplayClass9_01.<Execute>b__0() line 96 CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func1 compiler) line 84
CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func1 compiler) line 59 QueryCompiler.Execute[TResult](Expression query) line 92 EntityQueryProvider.Execute[TResult](Expression expression) line 79 Queryable.LastOrDefault[TSource](IQueryable1 source)
DbFunctionsSqlServerTest.FreeText_through_navigation() line 175

@smitpatel
Copy link
Contributor

Do we know which commit broke it?

@AndriySvyryd
Copy link
Member Author

No idea, probably new query pipeline

@AndriySvyryd
Copy link
Member Author

AndriySvyryd commented Oct 3, 2019

@ajcvickers enabled it in aca4958, but it was probably still broken

@smitpatel
Copy link
Contributor

The test is doing LastOrDefault with order by so exception. New query pipeline identified badly written tests. :trollface:

@ajcvickers ajcvickers added this to the Backlog milestone Oct 7, 2019
@smitpatel smitpatel self-assigned this Aug 3, 2020
@smitpatel smitpatel modified the milestones: Backlog, 5.0.0-rc1 Aug 3, 2020
smitpatel added a commit that referenced this issue Aug 3, 2020
@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 3, 2020
@ghost ghost closed this as completed in #21922 Aug 3, 2020
ghost pushed a commit that referenced this issue Aug 3, 2020
@ajcvickers ajcvickers modified the milestones: 5.0.0-rc1, 5.0.0 Nov 7, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query area-test 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