Apologies if this is boneheaded, I'm a total newbie..
I have three classes
Booking 1---* BookedOrder 1---* BookedOrderLine
I need a Set member variable in Booking called bookedOrders, and a Set member variable in BookedOrder called bookedOrderLines that are auto populated.
I find it's not possible to have a collection within a collection, so I thought the BookedOrderLine.hbm.xml would contain something like this
Code:
<many-to-one name="bookedOrder" class="BookedOrder" column="BOOKED_ORDER_ID"/>
And the BookedOrder.hbm.xml would contain this
Code:
<many-to-one name="booking" class="Booking" column="BOOKING_ID"/>
but it doesn't look like auto population would occur..
Is there a better, more elegant solution? If it's documented and I've missed it I'd be grateful for a pointer in the right direction!
Many thanks
Simon