Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.mydomain.ectd.budgets.IBudget" table="BPMS_BUDGETS">
<id name="budgetId" column="BUDGET_ID">
<generator class="uuid.hex" />
</id>
<property name="budgetType" column="BUDGET_TYPE"/>
<property name="budgetYear" column="BUDGET_YEAR"/>
<property name="isApproved" column="IS_APPROVED"/>
<property name="costType" column="COST_TYPE"/>
<many-to-one name="organisation" column = "ORG_CODE"/>
<many-to-one name="costElement" column="ELEMENT_ID"/>
<joined-subclass name="com.mydomain.ectd.labor.ILaborLineItem" table = "BPMS_LABOR" >
<key column="BUDGET_ID"/>
<property name="laborCost" column="LABOR_COST"/>
<property name="laborCount" column="LABOR_COUNT"/>
</joined-subclass>
</class>
</hibernate-mapping>
I have the above mapping file for my Budget and LaborBudget line item Classes ... with two tables ... one for Budget and other for LaborLineItems. but I am getting duplicat import error which means .. there is some problem with the mapping.
Ofcourse I have not coded the other joined-classes ... Isn't the case that I have to code for all the joined-subclass before testing it?
If not ... please let me know where the error is?