-
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
[Conventions] Validating conventions should be moved to ModelValidator #4016
Labels
area-perf
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-cleanup
Milestone
Comments
Also rename |
Refactor the methods in |
Poaching |
ajcvickers
added a commit
that referenced
this issue
May 8, 2019
Issue #4016 Also make sure validation logging is sent to the validation category, which means that `DiagnosticsLoggers` can be removed. There are some convention that do work and can throw exceptions. These have not been moved.
ajcvickers
added a commit
that referenced
this issue
May 8, 2019
Issue #4016 Also make sure validation logging is sent to the validation category, which means that `DiagnosticsLoggers` can be removed. There are some convention that do work and can throw exceptions. These have not been moved.
ajcvickers
added a commit
that referenced
this issue
May 11, 2019
Issue #4016 Also make sure validation logging is sent to the validation category, which means that `DiagnosticsLoggers` can be removed. There are some convention that do work and can throw exceptions. These have not been moved.
ajcvickers
added a commit
that referenced
this issue
May 13, 2019
Issue #4016 Also make sure validation logging is sent to the validation category, which means that `DiagnosticsLoggers` can be removed. There are some convention that do work and can throw exceptions. These have not been moved.
ajcvickers
added a commit
that referenced
this issue
May 13, 2019
Issue #4016 Also make sure validation logging is sent to the validation category, which means that `DiagnosticsLoggers` can be removed. There are some convention that do work and can throw exceptions. These have not been moved.
ajcvickers
added a commit
that referenced
this issue
May 13, 2019
Issue #4016 Also make sure validation logging is sent to the validation category, which means that `DiagnosticsLoggers` can be removed. There are some convention that do work and can throw exceptions. These have not been moved.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-perf
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-cleanup
Presently the conventions we run after model is built includes
KeyConvention
- throws for shadow key defined by conventionKeyAttributeConvention
- throws for composite PK defined using data-annotations and not overridden by fluent apiPropertyMappingValidationConvention
- throws for primitive properties which cant be mapped or properties not added to the modelForeignKeyPropertyDiscoveryConvention
- throws for ambiguos foreign key propertiesNone of above makes any changes to the model, they were defined as convention since they use configuration source and needed to be run on builder. But now we have configuration source defined on metadata instead of builder so we can move above task to ModelValidator step.
Motivation behind this, if there is no primary key defined on entity type then foreignkey which references such entity type will create alternate key by convention. This conventional key will throw exception before ModelValidator is run stating that foreign key references conventional key whereas the real issue with the model is lack of PK.
The text was updated successfully, but these errors were encountered: