Dear Members
I have the table
Product and I need work with
Map<k,Set<Item>> x variable for such class, in the
Set collection
Item is a
class/table where each row inserted can be of many types like
Alfa(alfa1 ... alfaN)
- alfa1
- alfa2
- alfa3
- alfa4
- ...
- alfaN
Beta(beta1 ... betaN )
Delta (delta1 ... deltaN)
Then a
Product is created for many
Item's (alfa,beta,delta), imagine like ingredients to cook a cake
The point is that each
Set<Item> collection (alfa,beta,delta) creates a
Product therefore think
product1 has
- alfa1
- alfa2
- beta1
- beta2
- beta3
- delta1
- delta2
- delta3
- delta4
The point would be has the follow
x.put("alfa", Set<Item> of type alfa 1..2)
x.put("beta", Set<Item> of type beta 1..3)
x.put("delta",Set<Item> of type delta 1..4)
therefore how I could do this mapping to persistence the Set within the Hash collection?
I work with annotations, how should be the XML generated?
Thanks in advanced