Fix bug Autoentities doesn't account for schema #3468
Open
RubenCerna2079 wants to merge 4 commits intomainfrom
Open
Fix bug Autoentities doesn't account for schema #3468RubenCerna2079 wants to merge 4 commits intomainfrom
RubenCerna2079 wants to merge 4 commits intomainfrom
Conversation
1 task
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes issue #3458 where autoentities generated without an explicit schema could later default to dbo during metadata lookup (causing startup failures for non-dbo objects) by ensuring MSSQL auto-generated entities preserve the originating schema in their source.object.
Changes:
- Update MSSQL autoentity generation to set
EntitySource.Objectas{schema}.{object}instead of{object}. - Add MSSQL integration coverage to validate autoentity generation/usage for tables in non-default schemas (
foo,bar) via REST + GraphQL. - Improve XML doc comments around autoentities-related tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs | Ensures auto-generated entities retain schema qualification in source.object to avoid defaulting to dbo. |
| src/Service.Tests/Configuration/ConfigurationTests.cs | Adds an integration test validating autoentities backed by non-dbo schemas work through REST/GraphQL; updates related doc comments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
nameof entities found inautoentitiesdoesnt account for schema #3458What is this change?
This changes how the in-memory entities are created from the
autoentitiesproperty by specifying the schema as well as the object they come from in theMsSqlMetadataProvider, in order for DAB to not default to thedboschema and cause a failure.How was this tested?
Added tests that ensure entities that are in the non-default schema
dboare also created without any issues and can be used by the REST and GraphQL endpoints.Sample Request(s)