Automap component with protected property

Jacob Madsen's Avatar

Jacob Madsen

06 Jul, 2010 01:28 PM via web

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!

  1. Support Staff 2 Posted by James Gregory on 06 Jul, 2010 01:37 PM

    James Gregory's Avatar

    Have you read the Field
    Support<https://fluentnhibernate.org/blog/2010/05/23/feature-focus-fields.html>
    blog
    post for 1.1?

  2. 3 Posted by Jacob Madsen on 06 Jul, 2010 02:51 PM

    Jacob Madsen's Avatar

    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?

  3. 4 Posted by Jacob Madsen on 06 Jul, 2010 03:17 PM

    Jacob Madsen's Avatar
    1. question :-)

    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'

Reply to this discussion

Preview Comments are parsed with Markdown. Help with syntax

Attached Files

    You can attach files up to 10MB

    What is the opposite of down?