Proxies of entities that are mapped with inheritance are always just
proxies of the base class because NHibernate can't know which subclass
it is when it creates the proxy.
I don't know how GetUnproxiedType() exactly works but I know that it
only works if you are using Castle as proxy factory. So in case you
use any other proxy factory (or update to NHibernate 3.2 and use the
default proxy factory there), you should use a different method to get
the real type.
I'm using the following method:
public static Type GetUnproxiedType(Type type) {
while (type.Assembly.IsDynamic && type.BaseType != null) {
type = type.BaseType;
}
return type;