Skip to content
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

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

Closed
ajcvickers opened this issue Nov 23, 2021 · 1 comment · Fixed by #28086
Closed
Assignees
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. easy-for-smit Easy query bugs type-bug
Milestone

Comments

@ajcvickers
Copy link
Contributor

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.

@ajcvickers ajcvickers added this to the MQ milestone Nov 30, 2021
@ajcvickers ajcvickers modified the milestones: MQ, 7.0.0 Jan 21, 2022
@smitpatel smitpatel added the easy-for-smit Easy query bugs label May 20, 2022
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label May 23, 2022
@ghost ghost closed this as completed in #28086 May 23, 2022
ghost pushed a commit that referenced this issue May 23, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-preview5 May 25, 2022
@voroninp
Copy link

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?

@ajcvickers ajcvickers modified the milestones: 7.0.0-preview5, 7.0.0 Nov 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. easy-for-smit Easy query bugs type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants