-
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
Error for optional dependents sharing table without identifying column #24573
Conversation
f78a278
to
5ddb2aa
Compare
5ddb2aa
to
eef48fd
Compare
Hello @smitpatel! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@@ -550,6 +550,10 @@ | |||
<value>Opening connection to database '{database}' on server '{server}'.</value> | |||
<comment>Debug RelationalEventId.ConnectionOpening string string</comment> | |||
</data> | |||
<data name="LogOptionalDependentWithoutIdentifyingProperty" xml:space="preserve"> | |||
<value>Entity type '{entityType}' is an optional dependent in table sharing without any required non shared property to identify if the entity type exist. If all nullable properties contain null value in database then an object instance won't be materialized in the query.</value> |
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.
<value>Entity type '{entityType}' is an optional dependent in table sharing without any required non shared property to identify if the entity type exist. If all nullable properties contain null value in database then an object instance won't be materialized in the query.</value> | |
<value>The entity type '{entityType}' is an optional dependent using table sharing without any required non shared property that could be used to identify whether the entity exists. If all nullable properties contain a null value in database then an object instance won't be created in the query. Add a required property to create instances with null values for other properties or mark the incoming navigation as required to always create an instance. </value> |
@@ -550,6 +550,10 @@ | |||
<value>Opening connection to database '{database}' on server '{server}'.</value> | |||
<comment>Debug RelationalEventId.ConnectionOpening string string</comment> | |||
</data> | |||
<data name="LogOptionalDependentWithoutIdentifyingProperty" xml:space="preserve"> | |||
<value>Entity type '{entityType}' is an optional dependent in table sharing without any required non shared property to identify if the entity type exist. If all nullable properties contain null value in database then an object instance won't be materialized in the query.</value> | |||
<comment>Error RelationalEventId.ModelValidationOptionalDependentWithoutIdentifyingPropertyWarning string</comment> |
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.
<comment>Error RelationalEventId.ModelValidationOptionalDependentWithoutIdentifyingPropertyWarning string</comment> | |
<comment>Warning RelationalEventId.ModelValidationOptionalDependentWithoutIdentifyingPropertyWarning string</comment> |
@@ -675,6 +679,9 @@ | |||
<data name="NullTypeMappingInSqlTree" xml:space="preserve"> | |||
<value>Expression '{sqlExpression}' in the SQL tree does not have a type mapping assigned.</value> | |||
</data> | |||
<data name="OptionalDependentWithDependentWithoutIdentifyingProperty" xml:space="preserve"> | |||
<value>Entity type '{entityType}' is an optional dependent containing other dependents in table sharing without any required non shared property to identify if the entity type exist. If all nullable properties contain null value in database then an object instance won't be materialized in the query causing nested dependent's values to be lost.</value> |
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.
<value>Entity type '{entityType}' is an optional dependent containing other dependents in table sharing without any required non shared property to identify if the entity type exist. If all nullable properties contain null value in database then an object instance won't be materialized in the query causing nested dependent's values to be lost.</value> | |
<value>Entity type '{entityType}' is an optional dependent using table sharing and containing other dependents without any required non shared property to identify whether the entity exists. If all nullable properties contain a null value in database then an object instance won't be created in the query causing nested dependent's values to be lost. Add a required property to create instances with null values for other properties or mark the incoming navigation as required to always create an instance. </value> |
We might also need to add a fwlink
|
||
VerifyError(RelationalStrings.OptionalDependentWithDependentWithoutIdentifyingProperty(nameof(A)), modelBuilder.Model); | ||
} | ||
|
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.
Add a test for LogOptionalDependentWithoutIdentifyingProperty
Resolves #23229
Resolves #23198
Resolves #21488