Hi,
I need to know if a java array or a map can be embedded with an entity object so that the array or map values all appear in one row as separate named (maybe map key or fixed prfix) columns in the database table. I would like to avoid coding this my hand to map 10 elements to columns manually if possible?
ie array
array[1] = "ABC"-> column name array1 = "ABC"
array[2] -> "DEF" -> column name array2 = "DEF"
or map(name,value)
map("column1","value1") -> column1 = value1
map("column2",value2") -> column2 = value2
I saw another question where someone asked a similar question, with an answer that mentioned using dynamic-components but the answer gave no concrete details of how to do it. dynamic component documentation is somewhat limited. I would like a solution using annotations if that is possible.
Can anyone assist?
Regards,
Phil.
|