-
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
Model produced in 3.0 is different from 2.2 #17979
Comments
@robalexclark - Both of them are not query issue but for some reason the generated model is different from 2.2. We will investigate if it was intentional breaking change or a bug. |
Just adding in that I had a similar issue migrating to 3.0. A foreign key Key by convention was now duplicated in migration as Key1. Had to explicitly configure the relationship between the entities using fluent configuration to resolve. |
Yes, I found an acceptable workaround by adding the following fluent configuration:
Although I still can't find this different requirement in the list of breaking changes |
I agree with @robalexclark and @jcemoller that after setting the relationships in the fluent configuration the generated fields are correct now. |
@robalexclark @thepra The breaking change is documented here |
Migrating a website from 2.2-> 3.0 (with no changes made other than those required by .net core 3.0) causes a previously working EF linq based query to fail.
This is the linq query:
Using the following entities (based on db views but this shouldn't matter right?).
V_FloodWebUserDoc:
V_FloodWebClientPolicy
On EF 2.2 The following correct query is produced:
But on 3.0rc1 the following query is created which fails
The differences between 2.2 and 3.0rc1 are
I haven't set up any foreign key references as annotations in the entities or as fluent code in modelbuilder as these were not required in EF Core 2.2. I appreciate the above "error" might be due to a breaking change rather than a bug but I couldn't find it in the breaking changes list.
Further technical details
EF Core version:
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET Core 3.0 rc1
Operating system: Windows 10
IDE: Visual Studio 2019 16.2.5
The text was updated successfully, but these errors were encountered: