Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saqibmehmoodgit/5e40df1bfdf9f76170d9059b53140606 to your computer and use it in GitHub Desktop.
Save saqibmehmoodgit/5e40df1bfdf9f76170d9059b53140606 to your computer and use it in GitHub Desktop.
User user = new User();
/// all setters of user.
List<ContactDto> contactDtos = new ArrayList<ContactDto>();
ContactDto contact = new ContactDto();
contact.set //// all setters of ContactDto
ContactDto contact2 = new ContactDto();
contact2.set //// all setters of ContactDto
contactDtos.add(contact);
contactDtos.add(contact2);
user.setContacts(contactDtos);
entitymanger.save(user);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment