We currently log messages or warning for some conditions while executing conventions (see discussion in #15499). For example:
- If we switch principal-dependent ends because we find
[Required] or non-nullable on a navigation,
- If
[Required] or non-nullability appears on navigations on both sides of a relationship
However the checks are limited to metadata that the conventions reason about and fail to detect some ambiguous scenarios, e.g.:
- The convention detects
[Required] (or non-nullability) on a navigation and makes the target of the navigation the principal, but that principal contains a good FK candidate property
- The convention detects
[Required] (or non-nullability) on a navigation that is later made to point to the dependent via explicit configuration
Discussing this with @AndriySvyryd and @smitpatel one of the conclusions was if we postpone the analysis to model validation we could implement more robust detection of ambiguous configurations.
We currently log messages or warning for some conditions while executing conventions (see discussion in #15499). For example:
[Required]or non-nullable on a navigation,[Required]or non-nullability appears on navigations on both sides of a relationshipHowever the checks are limited to metadata that the conventions reason about and fail to detect some ambiguous scenarios, e.g.:
[Required](or non-nullability) on a navigation and makes the target of the navigation the principal, but that principal contains a good FK candidate property[Required](or non-nullability) on a navigation that is later made to point to the dependent via explicit configurationDiscussing this with @AndriySvyryd and @smitpatel one of the conclusions was if we postpone the analysis to model validation we could implement more robust detection of ambiguous configurations.