hibernate join标签使用
<class
name="Timecontrol"
table="timecontrol"
<id
name="stopId"
column="stop_id"
type="java.lang.Long"
length="10"
>
<generator class="native"/>
</id>
<property
name="scopeCode"
type="java.lang.String"
column="scope_code"
/>
<join table="ensys" >
<key column="en_code" />
<many-to-one name="ensysDic1" class="EnsysDic" property-ref="dicId" unique="true">
<column name="dic_id"></column>
</many-to-one>
</join>
</class>
如保让本映射类(Timecontrol)的scopeCode与join表中 en_code的连接,而不是让本映射类(Timecontrol)的主键(stop_id)进行连接与join表中 en_code的连接