Let me clarify.
In your Employee mapping:
Quote:
<set name="jobHistory" table="JOB_HISTORY" lazy="true">
<key column="EMPLOYEE_ID"/>
<composite-element class="test.JobHistory">
<property name="start_date" />
<many-to-one name="job_id" class="test.Job"/>
</composite-element>
</set>
You have declared jobHistory as a class of type testJobHistory. You have specified that the set should consist of composite elements, and be persisted to the table JOB_HISTORY.
This is your definition for the JOB_HISTORY table and the JobHistory ("testJobHistory") object. You do not need, and should not have, a separate mapping for a different
class named JobHistory.
If you don't understand how sets of composite elements work, please re-read the documentation. It seems as though you are confused between collections composite elements (which are defined and wholly contained within another class) and collections of classes (which have explicit e.g. one-to-many relationships defined to another class).
Given the Employee XML definition you provided -only-, you should be generating a class of name JobHistory (ref. the <composite-element class= attribute). That class should have a setter and getter of type test.Job, then you could use the code I posted.