-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
InvalidOperationException: EF.Property called with wrong property name. #19155
Comments
@olatunjee Thanks for reporting this issue. We will look into it at our next triage meeting. |
Thanks @ajcvickers Perhaps, this additional info can be of help in identifying what's wrong. Like I said, this code is unmodified and have worked in previous version of EF Core for more than 12 months prior. This is the generated SQL query being executed. Copied from the Debug window. SELECT COUNT(*)
FROM [Listing] AS [l]
INNER JOIN [City] AS [c] ON [l].[CityId] = [c].[Id]
INNER JOIN [State] AS [s] ON [c].[StateId] = [s].[Id]
WHERE (((((([l].[IsPublished] = @__isPublished_0) AND ([l].[IsApproved] = @__isApproved_1)) AND ([s].[CountryId] = @__model_CountryId_2)) AND [l].[AdvertTypeId] IN (CAST(1 AS bigint), CAST(4 AS bigint))) AND [l].[MarketStatusId] IN (CAST(1 AS bigint), CAST(2 AS bigint), CAST(3 AS bigint))) AND ((
SELECT COUNT(*)
FROM [ListingPhoto] AS [l0]
WHERE [l].[Id] = [l0].[ListingId]) > 0)
And also this =>
|
@olatunjee We are going to need a small, runnable project or complete code listing that demonstrates the behavior in order to fully investigate. |
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it. BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions. |
@olatunjee did you figure this out? I'm having the same issue. |
Same issue. in my case it has happened when migrating from .net 2.1 to 3.0 and only happend on one of my calls |
@jamieoneill - Please file a new issue with detailed repro. |
@smitpatel - No need. Seems like it was the same as #18090. Fixed by upgrading to 3.1. |
Hi, I am having the same issue with the latest libraries. here's the repo this works https://localhost:5001/api/incidents?$expand=location, eventTypes & $filter= location/name eq 'MHC' this doesn't NB when you first run the app the eventtype collection is empty for all objects. In my dataset they are not but it shouldn't make a difference for debugging. BTW I confirm that disabling null checks does simplify the filter expression: return Ok(await query.GetAsync(_mapper, options, HandleNullPropagationOption.False)); - which does not throw the exception. |
Hi everyone. Kudos to the EF Core team.
I'm having an error thrown upon calling the following line (which have worked well in previous versions of EF Core for many months):
Tools/Nuget Packages
VS 2019 Community Edition
ASP.Net Core 3.0, and
verbose output/messages:
An unhandled exception occurred while processing the request.
InvalidOperationException: EF.Property called with wrong property name.
Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
The text was updated successfully, but these errors were encountered: