-
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
Decide how data annotations on fields should work #6267
Labels
Comments
We like it the way @ajcvickers implemented it, e.g. an annotation on the property always override the one on the field. |
ajcvickers
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Oct 15, 2022
ajcvickers
added
type-unknown
and removed
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-unknown
labels
Oct 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently data annotations on fields are used if and only if the field is mapped and has no property associated. For example, the Key attribute will be applied in this case:
assuming _key is a mapped field:
The data annotation will not be applied in this case:
It is instead expected that the data annotation will be taken from the property.
If we decide to allow data annotations to be applied to fields that have associated properties, then we also need to decide what to do when the field and the property have conflicting annotations:
The text was updated successfully, but these errors were encountered: