Hibernate version: 2.1.7
Mapping documents:
Code:
<hibernate-mapping>
<class name="myProj.SupplierLine" table="SUP_LINE">
<id name="id">
<generator class="native"/>
</id>
<property name="cost" type="double"/>
<many-to-one name="supplier" class="myProj.legacy.Supplier"/>
</class>
<hibernate-mapping package="myProj.legacy">
<class name="Supplier" table="SUPPLIER_DIM">
<id name="code" column="SUP_CODE" type="string" length="25">
<generator class="assigned"/>
</id>
<property name="name" column="SUP_NAME" type="string" length="200" not-null="true"/>
<property name="state" column="SUP_ACTIVEIND" type="string" length="10" not-null="true"/>
</class>
</hibernate-mapping>
</hibernate-mapping>
Error Message when running hbm2ddl:
Quote:
Schema text failed: An association from the table SUP_LINE refers to an unmapped class: myProj.legacy.Supplier
How can I successfully generate the schema for SupplierLine without creating the schema for Supplier? I do have a Supplier.hbm.xml, but if I add this to my list of mapping files when I call hbm2ddl, then this will drop the legacy SUPPLIER table. I don't want that to happen.
Any help is greatly appreciated.