我有一个订单对象:order,它关联了N条订单行记录:V3OrdersItems
order.getV3OrdersItemsSet();
在数据库中,V3OrdersItems 明明有2条记录,
但是这里 order.getV3OrdersItemsSet(); 返回的个数却只是1
我的相关xml 配置如下:
<set name="v3OrdersItemsSet" table="v3_orders_items" inverse="true" cascade="none" fetch="select" sort="natural">
<key column="orders_id"/>
<one-to-many class="com.litb.v3.center.database.auto.entities.V3OrdersItems"/>
</set>
<many-to-one not-null="true" insert="false" update="false" fetch="select" name="orders" class="com.litb.v3.center.database.auto.entities.V3Orders">
<column name="orders_id"/>
</many-to-one>