Hi
i'm begginer in NHibernate, im trying to learn a basic mapping methods and I have a big problem with them.
I mean:
I have two classes
Code:
class Customer : Person{
public int CustomerId;
public string FirstName;
}
and
Code:
class Person{
public int PersonId
public string LastName;
}
How can I map this inheritance?
I'm trying to:
Code:
<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="APP" auto-import="true">
<class name="APP.Customer, APP" lazy="false">
<id name="CustomerId" access="field" type="int">
<generator class="increment" />
</id>
<property name="FirstName" access="field" column="FirstName"/>
<joined-subclass name="Person">
<key column="PersonId" />
<property name="LastName"/>
</joined-subclass>
</class>
</hibernate-mapping>
but I have a exception that "could not load a Person type in assemply APP"
I don't know how to do it.
Help me please.