<hibernate-mapping>
<class name= "org.qsm.Major " table= "major ">
<id name= "id " type= "java.lang.String ">
<column name= "id " length= "2 " />
<generator class= "assigned " />
</id>
<property name= "name " type= "java.lang.String ">
<column name= "name " length= "20 " not-null= "true " />
</property>
<property name= "shortname " type= "java.lang.String ">
<column name= "shortname " length= "10 " not-null= "true " />
</property>
<property name= "department " type= "java.lang.String ">
<column name= "department " length= "4 " not-null= "true " />
</property>
<set name= "classeses " inverse= "true ">
<key>
<column name= "majorid " length= "2 " not-null= "true " />
</key>
<one-to-many class= "org.qsm.Classes " />
</set>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name= "org.qsm.Classes " table= "classes ">
<id name= "id " type= "java.lang.Integer ">
<column name= "id " />
<generator class= "native " />
</id>
<many-to-one name= "major " class= "org.qsm.Major " fetch= "select ">