PersonnelUni1ToM personnel = new PersonnelUni1ToM();
personnel.setPersonId("unionetomany_1");
personnel.setPersonName("Amresh");
Set<HabitatUni1ToM> addresses = new HashSet<HabitatUni1ToM>();
HabitatUni1ToM address1 = new HabitatUni1ToM();
address1.setAddressId("unionetomany_a");
address1.setStreet("AAAAAAAAAAAAA");
HabitatUni1ToM address2 = new HabitatUni1ToM();
address2.setAddressId("unionetomany_b");
address2.setStreet("BBBBBBBBBBB");
addresses.add(address1);
addresses.add(address2);
personnel.setAddresses(addresses);
dao.insert(personnel);