Automap component with protected property
Hi there,
After some struggle I just discovered that properties on my component types should be public and NOT protected, when I'm using the AutoMap.
I'm wondering if this is intented or its a bug that protected properties is not supported?
The version is 1.1 of fluent and my component type only have a single property.
Cheers!
Support Staff 2 Posted by James Gregory on 06 Jul, 2010 01:37 PM
Have you read the Field
Support<https://fluentnhibernate.org/blog/2010/05/23/feature-focus-fields.html>
blog
post for 1.1?
3 Posted by Jacob Madsen on 06 Jul, 2010 02:51 PM
Very nice with this kind of support for fields! I only had an override of the ShouldMap(Type type).
2 questions:
I cannot see a check (like CheckField) in PersistenceSpecification?
Is there a similar field convention like AttributePropertyConvention missing or is it just named something different than AttributeFieldConvention?
4 Posted by Jacob Madsen on 06 Jul, 2010 03:17 PM
How do I tell it not to look for a "getter"?
It throws this exception after I added field support to the override of the ShouldMap method: NHibernate.PropertyNotFoundException: Could not find a getter for property '_value' in class 'MyComponentTypeWithPrivateField'