Hibernate version: 3
Mapping documents:
I am getting the following message when I try to generate my java using my mapping documents:
org.hibernate.MappingException: An association from the table EMAIL_REROUTE_EMPLOYEES refers to an unmapped class: com.encana.admin.common.model.mcdas.McDasPerson
Here is my mapping document:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.encana.admin.courierlog.model.EmailRerouteEmployee"
table="EMAIL_REROUTE_EMPLOYEES">
<meta attribute="class-description">
Upon the receipt of a package from a courier, the consignee is
normally notify. In the case that they have requested not to
be notified at all, or to have another individual notified on their
behalf, a/numerous records will be returned from this table.
@author Graham Heath
</meta>
<id
name="id"
type="java.lang.Integer"
column="EMAIL_REROUTE_ID"
length="6">
<meta attribute="scope-set">protected</meta>
<generator class="native"></generator>
</id>
<property
name="consigneeEmplId"
type="java.lang.String"
column="CONSIGNEE_EMPLID"
not-null="true"
length="12">
<meta attribute="field-description">EnCana employee id of the person to whom
a package is addressed.
</meta>
</property>
<property
name="routingType"
type="java.lang.String">
<meta attribute="field-description">Courier's name.</meta>
<column name="ROUTING_TYPE" length="20" not-null="true"/>
</property>
<property
name="reroutedEmplId"
type="java.lang.String"
column="REROUTED_EMPLID"
not-null="false"
length="12">
<meta attribute="field-description">EnCana employee id of the person to whom
a package notification is sent.
</meta>
</property>
<many-to-one
name="consignee"
class="com.encana.admin.common.model.mcdas.McDasPerson"
cascade="none"
outer-join="auto"
column="CONSIGNEE_EMPLID" />
<many-to-one
name="reroutedEmployee"
class="com.encana.admin.common.model.mcdas.McDasPerson"
cascade="none"
outer-join="auto"
column="REROUTED_EMPLID" />
</class>
</hibernate-mapping>
Here is my hibernate.cfg.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory>
<property name="connection.provider_class">com.encana.admin.common.db.hib3.HibernateConnectionProvider</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="show_sql">true</property>
<mapping resource="com/encana/admin/common/model/mcdas/McDasPerson.hbm.xml"/>
<mapping resource="com/encana/admin/courierlog/model/IncomingLog.hbm.xml"/>
</session-factory >
</hibernate-configuration>
Not sure what the issue is. Help would be deeply appreciated.
Thanks,
Graham
|