I have a class generated from a WSDL that has a bunch of public properties and a public event. I'm extending this class with my own and adding some properties to it. All of my own properties are declared virtual
, but the base class properties are not virtual.
I'm using Fluent NHibernate's ClassMap to map only the properties from my extended class. How do I prevent (Fluent)NHibernate from trying to persist all the base class's public members?
At the moment, I get the following exception when creating the ISessionFactory:
NHibernate.InvalidProxyTypeException: The following types may not be used as proxies:
Type: method get_
<BaseClassProperty
> should be 'public/protected virtual' or 'protected internal virtual'Type: method set_
<BaseClassProperty
> should be 'public/protected virtual' or 'protected internal virtual'...
Type: method add_
<BaseClassEvent
> should be 'public/protected virtual' or 'protected internal virtual'Type: method remove_
<BaseClassEvent
> should be 'public/protected virtual' or 'protected internal virtual'