-
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
Different value generation strategies on Owned Entity Types #20740
Labels
area-model-building
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
punted-for-5.0
type-bug
Milestone
Comments
@jochenjonc Thanks for reporting this. As a workaround you can explicitly configure the shadow key property in the owned types: builder.OwnsOne(c => c.Location, l =>
{
l.Property<int>("ContactId").UseHiLo("ContactHiLoSequence");
l.OwnsOne(la => la.Address, la =>
{
la.Property<int>("LocationContactId").UseHiLo("ContactHiLoSequence");
...
}).WithOwner();
...
}); |
@ajcvickers with the workaround, the query that is no being produced by EF for issue #19907 is a lot better now. Thx. |
AndriySvyryd
added
the
verify-fixed
This issue is likely fixed in new query pipeline.
label
Jun 10, 2020
AndriySvyryd
removed
the
verify-fixed
This issue is likely fixed in new query pipeline.
label
Nov 5, 2020
Fixed in bca8fa5 |
AndriySvyryd
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Sep 21, 2021
The work around fix the exception/error with the ef cli tool, but databse doesnot have the fields as mentioned here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-model-building
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
punted-for-5.0
type-bug
When trying Preview 3 of EF Core 5, to see if issue #18299 that has been solved, also solves my issue #19907, I got stuck on the following error.
I didn't have this error on Preview 2 and on EF Core 2.2.
Steps to reproduce
I have the following entities and owned types:
The EntityTypeConfiguration is as follows:
When fetching the Contact entity in EF Core 5 Preview 3 I get the error mentioned above.
Here is the full stacktrace:
Further technical details
EF Core version: 5 Preview 3
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: NET Core 3.1.1
Operating system: Windows 10
IDE: Visual Studio 2019 16.5.4
The text was updated successfully, but these errors were encountered: