I m wondering how can i map a class having arrayList which should keep its values to another table. Let take some code for example.
Class Person
{
int id;
String name;
ArrayList<String> childNames
}
in db has 2 tables 1. Person -> storing id and name 2. Childs -> storing child name and id //pseudo Object A
id;
name Ivan
ArrayList childs = new ArrayList();
childs.add("Peter");
Chidls.add("Lora");
so in db it shoud looks like
Table Person
id name
1 Ivan
Table Childs
id name
1 Peter
1 Lora
But using annotations, any suggestions?
Regards thanks