NHibernate.Mapping.Attributes
NHibernate.Mapping.Attributes copied to clipboard
NHMA-35 - Automatic "access" attribute calculation
Usually you should specify "access" attribute. There are mapping errors when someone refactors code and converts field to/from property and forgets to change attribute value.
There is some automatisation:
- If you specify "access" explicit - it will be used
- If "access" is not specified - NHMA will determine if it is "field" or "property"
It works for all attribute types except ComponentAttribute, there you should specify "access" manually.
I am not too familiar with pull requests. Last commit 7f560ea should not be in that request :)
@Toshik: was there a JIRA issue for this?
@rjperes Nope, I just use it in production for a long time, now wanted to share
There was hell, when we refactored our model from field mapping to property/field mixed mapping. We always forget to change attribute value from/to "property"/"field", so I have made this improvement.
OK, but you should create JIRA issues, just to keep track of changes... otherwise, it's difficult to know why things changed.
Ok, here it is: https://nhibernate.jira.com/browse/NHMA-35