My appologies if this has been answered before but I can't seem to find anything on this topic.
If I map my one-to-many collection as a map, how are new elements represented? Do I simply call put on my map and insert a null key? I'm thinking my Java code would look something like this.
Am I on the right track or do I have to stick with Sets to represent new values?
Code:
{
Order oder = new Order();
LineItem item = new LineItem();
Map lineItems = new HashMap();
,,,
item.setOrder(order);
lineitems.put(null, item);
order.setLineItems(lineItems);
...
session.saveOrUpdate(order);
}