one :
<set name="precontracts" inverse="true" lazy="false" cascade="all">
<key>
<column name="SCHEDULE_ID" precision="8" scale="0" not-null="true" />
</key>
<one-to-many class="com.oa.beans.Precontract" />
</set>
many:
<many-to-one name="schedule" class="com.oa.beans.Schedule" fetch="join" update="true" cascade="all">
<column name="SCHEDULE_ID" precision="8" scale="0" not-null="true" />
</many-to-one>
<set name="precontracts" inverse="true" lazy="false" cascade="all">
<key>
<column name="SCHEDULE_ID" precision="8" scale="0" not-null="true" />
</key>
<one-to-many class="com.oa.beans.Precontract" />
</set>
many:
<many-to-one name="schedule" class="com.oa.beans.Schedule" fetch="join" update="true" cascade="all">
<column name="SCHEDULE_ID" precision="8" scale="0" not-null="true" />
</many-to-one>