Skip to content

Update optional dependents message to indicate non-null value rather than non-default #26800

Closed

Description

@ajcvickers

Current message:

The entity of type 'Dependent' is an optional dependent using table sharing. The entity does not have any property with a non-default value to identify whether the entity exists. This means that when it is queried no object instance will be created instead of an instance with all properties set to default values. Any nested dependents will also be lost. Either don't save any instance with only default values or mark the incoming navigation as required in the model. Consider using 'DbContextOptionsBuilder.EnableSensitiveDataLogging' to see the key values of the entity.

Activity

  1. added this to the MQ milestone on Nov 30, 2021
  2. modified the milestones: MQ, 7.0.0 on Jan 21, 2022
  3. added a commit that references this issue on May 23, 2022
    f02e3aa
  4. ghost closed this as completedin #28086on May 23, 2022
  5. ghost added a commit that references this issue on May 23, 2022
    bcece16
  6. modified the milestones: 7.0.0, on May 25, 2022
  7. voroninp commented on Jun 21, 2022

    @voroninp

    This means that when it is queried no object instance will be created instead of an instance with all properties set to default values.

    does it mean:

    If all properties of saved instance had default values, then returned value for the object will be just null.

    How do I turn this warning off for concrete type?

  8. modified the milestones: , 7.0.0 on Nov 5, 2022
  9. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions