here is some more logging. Note that i output the list size at the start which is 0 and then at the end of the various HQL calls is 2. If I run the first HQL statement, the main record comes back, 1 row, fine. The I run the other 2 collection HQL calls, the list comes back as 1 row only. The other list comes back as 2 rows. Yet each list has +1 null element. This has to be Hibernate?
Code:
[b]1lisize=0[/b]
Hibernate: select pof0_.pof_id as pof_id3_, pof0_.created as created3_, pof0_.status as status3_, pof0_.reference as reference3_, pof0_.external_id as external5_3_, pof0_.originator as originator3_, pof0_.originator_full_name as originat7_3_, pof0_.department as department3_, pof0_.department_code as departme9_3_, pof0_.currency_code as currenc10_3_, pof0_.tax_rate as tax_rate3_, pof0_.authoriser as authoriser3_, pof0_.authoriser_full_name as authori13_3_, pof0_.applies_to_min as applies14_3_, pof0_.applies_to_max as applies15_3_, pof0_.net_cost as net_cost3_, pof0_.discount_cost as discoun17_3_, pof0_.carriage_cost as carriag18_3_, pof0_.tax_cost as tax_cost3_, pof0_.gross_cost as gross_cost3_, pof0_.notes as notes3_, pof0_.supplier_id as supplie22_3_, pof0_.delivery_address_id as deliver23_3_, supplier1_.supplier_id as supplier1_0_, supplier1_.code as code0_, supplier1_.address_id as address_id0_, intlcompan2_.intl_comp_det_id as intl_com1_1_, intlcompan2_.company as company1_, intlcompan2_.contact as contact1_, intlcompan2_.telephone as telephone1_, intlcompan2_.fax as fax1_, intlcompan2_.email as email1_, intlcompan2_.web as web1_, intlcompan2_.address_line_1 as address_8_1_, intlcompan2_.address_line_2 as address_9_1_, intlcompan2_.address_line_3 as address10_1_, intlcompan2_.address_line_4 as address11_1_, intlcompan2_.address_line_5 as address12_1_, intlcompan2_.address_line_6 as address13_1_, intlcompan2_.address_line_7 as address14_1_, intlcompan3_.intl_comp_det_id as intl_com1_2_, intlcompan3_.company as company2_, intlcompan3_.contact as contact2_, intlcompan3_.telephone as telephone2_, intlcompan3_.fax as fax2_, intlcompan3_.email as email2_, intlcompan3_.web as web2_, intlcompan3_.address_line_1 as address_8_2_, intlcompan3_.address_line_2 as address_9_2_, intlcompan3_.address_line_3 as address10_2_, intlcompan3_.address_line_4 as address11_2_, intlcompan3_.address_line_5 as address12_2_, intlcompan3_.address_line_6 as address13_2_, intlcompan3_.address_line_7 as address14_2_ from dbPOF.dbo.tbl_POFs pof0_ left outer join dbPOF.dbo.tbl_Suppliers supplier1_ on pof0_.supplier_id=supplier1_.supplier_id left outer join dbPOF.dbo.tbl_IntlCompanyDetails intlcompan2_ on supplier1_.address_id=intlcompan2_.intl_comp_det_id left outer join dbPOF.dbo.tbl_IntlCompanyDetails intlcompan3_ on pof0_.delivery_address_id=intlcompan3_.intl_comp_det_id where pof0_.pof_id=?
Hibernate: select actionhist0_.action_id as action_id__, actionhist0_.pof_id as pof_id__, actionhist0_.action_id as action_id0_, actionhist0_.created as created0_, actionhist0_.username as username0_, actionhist0_.fullName as fullName0_, actionhist0_.department as department0_, actionhist0_.action as action0_, actionhist0_.pof_id as pof_id0_ from dbPOF.dbo.tbl_Actions actionhist0_ where actionhist0_.pof_id=?
Hibernate: select lineitems0_.line_item_id as line_ite1___, lineitems0_.pof_id as pof_id__, lineitems0_.line_item_id as line_ite1_0_, lineitems0_.code as code0_, lineitems0_.description as descript3_0_, lineitems0_.fn as fn0_, lineitems0_.quantity as quantity0_, lineitems0_.unit_price as unit_price0_, lineitems0_.tax_type as tax_type0_, lineitems0_.net_cost as net_cost0_, lineitems0_.notes as notes0_, lineitems0_.pof_id as pof_id0_ from dbPOF.dbo.tbl_LineItems lineitems0_ where lineitems0_.pof_id=?
[b]2lisize=2[/b]