现在在实现hibernate的多对一映射,人员表与单位表关联
<many-to-one name="unitno" class="W_DWPO" fetch="join"
update="true" insert="true"
not-found="ignore" not-null="false"
lazy="false" >
<column name="unitno"></column>
</many-to-one>
但由于数据原因,可能导入的人员无对应的单位表数据,我在设置中通过not-found="ignore"进行了过滤,
但这样人员的PO表中对应的单位PO值就为null。
我的想法是如果无对应的单位数据,就显示该人员的unitno编号,即只是人员表里面的单位编码。
请问该如何获取?
<many-to-one name="unitno" class="W_DWPO" fetch="join"
update="true" insert="true"
not-found="ignore" not-null="false"
lazy="false" >
<column name="unitno"></column>
</many-to-one>
但由于数据原因,可能导入的人员无对应的单位表数据,我在设置中通过not-found="ignore"进行了过滤,
但这样人员的PO表中对应的单位PO值就为null。
我的想法是如果无对应的单位数据,就显示该人员的unitno编号,即只是人员表里面的单位编码。
请问该如何获取?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货