Hi,
I can't figure out how to do my mapping.
I have 3 tables :
Person {PersonID, Name}
Analyst{AnalystID, PersonID, Role}
PersonAnalyst{PersonID, AnalystID}
In my business model an Analyst inherits from Person. And a Person can
holds a collection of Analysts.
I've managed to map Person and Analyst (using a joined-subclass for
Analyst) but I can't figure out how to map PersonAnalyst ! Can
someone help me with it ?
So far I've got that :
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
schema="TempCRM.dbo">
<class name="Metrica.Person, Metrica" table="Person">
<id name="Id" column="PersonID">
<generator class="identity"/>
</id>
<property name="Name" type="string" column="Name"/>
<!-- Description of an analyst entity -->
<joined-subclass name="Metrica.Analyst, Metrica" table="Analyst"
lazy="true">
<key column="PersonID"/>
<property name="Role" type="string" column="Role"/>
</joined-subclass>
</class>
</hibernate-mapping>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---