Code:
<class name="edu.udel.dining.beans.PlanBean" table="dining_planbean">
<composite-id>
<key-property name="mealPlan" column="mealPlan"/>
<key-many-to-one name="screen1HPBean" class="Screen1HPBean" column="id"/>
</composite-id>
<property name="blackBoard" type="string"/>
<property name="numberOfMeals" type="string"/>
<property name="semesterAmount" type="string"/>
<property name="pointsAmount" type="string"/>
<property name="traditionalOption" type="int"/>
<property name="nonTraditionalOption" type="int"/>
<property name="allowCancellations" type="int"/>
</class>
or
Code:
<class name="edu.udel.dining.beans.PlanBean" table="dining_planbean">
<composite-id>
<key-property name="mealPlan" column="mealPlan"/>
<key-property name="idMealPlan" column="id"/>
</composite-id>
<property name="blackBoard" type="string"/>
<property name="numberOfMeals" type="string"/>
<property name="semesterAmount" type="string"/>
<property name="pointsAmount" type="string"/>
<property name="traditionalOption" type="int"/>
<property name="nonTraditionalOption" type="int"/>
<property name="allowCancellations" type="int"/>
</class>
if you don't need the association to be bidirectionnal.
Also implements Serializable and define equals/hashcode
http://www.hibernate.org/hib_docs/refer ... lshashcode