I just upgraded my .net windows apps from nHibernate 1.2 to 3.3 but having an issue now. During runtime, it throws the following error:
A first chance exception of type 'NHibernate.InvalidProxyTypeException' occurred in NHibernate.dll NHibernate.InvalidProxyTypeException: The following types may not be used as proxies: CallType : method Equals should be 'public/protected virtual' or 'protected internal virtual' .....
Here's the class:
public class CallType : DomainObject<int>
{
public virtual String Description
{
get;
protected set;
}
public virtual String Name
{
get;
protected set;
}
public CallType()
{}
public override int GetHashCode()
{
return string.Format("{0}|{1}", Description, Name).GetHashCode();
}
}
Did I miss anything? All members are public virtual. Lazy loading is required in this application