private Set<PresentProductSociety> PPSSet;//实体属性
<set name="PPSSet">
<comment>一方配置</comment>
<key column="society_id"/>
<one-to-many class="cn.pojo.PresentProductSociety"/>
</set>
private Society society;//实体属性
<many-to-one name="society" class="cn.pojo.Society" fetch="select">
<column name="society_id">
<comment>多方配置</comment>
</column>
</many-to-one>
////////////////////////////以下是单向,也就是只需要配置一部分/////////////////
private Society society;//实体属性
<many-to-one name="society" class="cn.pojo.Society" fetch="select">
<column name="society_id">
<comment>多方配置</comment>
</column>
</many-to-one>
本文转自 艺晨光 51CTO博客,原文链接:http://blog.51cto.com/ycgit/1617187,如需转载请自行联系原作者