
如上图所示,warehousePicked 中包含了warehousePicking
同时,数据库中warehousePicking存在数据 ,但是在debug 时warehousePicked的bean中,warehousePicking就是没有数据,但是通过getXX能够获得。
原因是:hibernate中到机制问题
解决方案:在warehousePicked的hibernate中,找到warehousePicking
如是加上代码
|
1
2
3
4
5 |
<many-to-one name="warehousePicking"
class="com.ky.susliks.warehousemanagement.entity.hibernate.WarehousePicking"
<span style="color: rgb(255, 0, 0);">lazy="false"</span>> <column name="picking_id"
not-null="false"> <comment>出库计划单</comment> </column> </many-to-one> |
原文:http://www.cnblogs.com/kyxyes/p/3522896.html