-
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
Fix to #19994 - Query/Test: figure out how to represent shadow properties in expected result queries #23579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please unique-fy the whole thing with expected query rewriter and shadow mappings.
Right now shadow mappings are on expected data which you are copying over to test base duplicating it.
Ideally the shadow property mapping should be on fixture base since that determines the model fixture is using. We could just apply shadow property mapping rewriter always and autoamatically without testbase asking for it.
test/EFCore.Relational.Specification.Tests/Query/TPTGearsOfWarQueryRelationalFixture.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Specification.Tests/Query/ComplexNavigationsSharedTypeQueryTestBase.cs
Show resolved
Hide resolved
test/EFCore.Specification.Tests/Query/GearsOfWarQueryFixtureBase.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Specification.Tests/TestModels/GearsOfWarModel/GearsOfWarData.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Specification.Tests/TestUtilities/ExpectedQueryRewritingVisitor.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Specification.Tests/TestUtilities/ExpectedQueryRewritingVisitor.cs
Outdated
Show resolved
Hide resolved
test/EFCore.Specification.Tests/TestUtilities/ExpectedQueryRewritingVisitor.cs
Outdated
Show resolved
Hide resolved
…ties in expected result queries Building the mapping in test fixtures - we need access to expected data so we also have access to navigations and entities for shadow navigations in the future. Fixes #19994
updated |
Building the mapping when we generate the expected data, so we also have access to navigations and entities for shadow navigations in the future.
Discriminators are added at the test class level since we use same expected data setup for TPH and TPT.
Fixes #19994