NHibernate mapowanie dziedziczenia

0

Mam dwie klasy

 
class Customer : Human{
   public string FirstName;
}

oraz

 
class Human{
    public string LastName;
}

czy ktoś mógłby mi zrobić mapowanie dla tych klas w NHibernate?

Probowalem cos w ten desen:

<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true">
  <class name="NH.Customer, NH" lazy="false">
    <id name="PlayerId" access="field">
      <generator class="increment" />
    </id>
    <property name="FirstName" access="field" column="FirstName" type="string"/>
    <joined-subclass name="Human">
      <property name="LastName" column="LastName" />
    </joined-subclass>
  </class>
</hibernate-mapping>

ale otrzymuje blad

ze property w joined-subclass jest nieoczekiwanym elementem.
Gdy zmienilem property na key (strzelałem) to z kolei błąd mówi o tym ze nie moze znalezc typu Human

Mapowanie Humana wygladalo tak

<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true">
  <class name="NH.Human, NH" lazy="false">
    <id name="HumanId" access="field">
      <generator class="increment" />
    </id>
    <property name="LastName" access="field" column="LastName" type="string"/>
  </class>
</hibernate-mapping>

Bede wdzieczny za kazda pomoc

0

PS.
w Cusotmer zamiast PlayerId jest oczywiscie CustomerId. Mój błąd przy kopiowaniu.
Klasa Customer zawieta jeszcze
public int CustomerId
a Human
public int HumanId

1 użytkowników online, w tym zalogowanych: 0, gości: 1