多表的建立 (一) UserZJ映射
1using System;
2using System.Collections;
3
4namespace temp0704
5{
6 UserZJ
62}
2using System.Collections;
3
4namespace temp0704
5{
6 UserZJ
62}
1<?xml version="1.0" encoding="utf-8" ?>
2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="temp0704.UserZJ, temp0704" table="UserZJ">
4 <id name="Id" type="Int32" unsaved-value="null">
5 <column name="id" length="4" sql-type="int" not-null="true" unique="true" index="PK_UserZJ"/>
6 <generator class="native" />
7 </id>
8 <property name="Zname" type="String">
9 <column name="zname" length="50" sql-type="varchar" not-null="false"/>
10 </property>
11 <many-to-one name="DTZJ" class="temp0704.DataZJ, temp0704" not-found="exception" lazy="proxy" column="Meid" />
12 </class>
13</hibernate-mapping>
14
相關映射2<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
3 <class name="temp0704.UserZJ, temp0704" table="UserZJ">
4 <id name="Id" type="Int32" unsaved-value="null">
5 <column name="id" length="4" sql-type="int" not-null="true" unique="true" index="PK_UserZJ"/>
6 <generator class="native" />
7 </id>
8 <property name="Zname" type="String">
9 <column name="zname" length="50" sql-type="varchar" not-null="false"/>
10 </property>
11 <many-to-one name="DTZJ" class="temp0704.DataZJ, temp0704" not-found="exception" lazy="proxy" column="Meid" />
12 </class>
13</hibernate-mapping>
14
<many-to-one name="DTZJ" class="temp0704.DataZJ, temp0704" not-found="exception" lazy="proxy" column="Meid" />