I am trying to code a 1-many mapping inside a List element like so:
<list name="inputProcessSteps_Hibernate">
<key column="cmpnt_typ_c"/>
<index column="STEP_ID_N"/>
<one-to-many class="com.nppc.mes.productsupply.productdefinition.InputProcessStep"/>
</list>
When I check the parent object, it contains a list with the 5 elements I expect, plus 10 nulls, which are not expected.
When I change the mapping to use set:
<set name="inputProcessSteps_Hibernate">
<key column="cmpnt_typ_c"/>
<one-to-many class="com.nppc.mes.productsupply.productdefinition.InputProcessStep"/>
</set>
I get a collection with the 5 expected elements only.
Why does List generate the unexpected nulls?
|