package com.example;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class Contact {
  public Integer id;
  public String email;
  public String firstName;
  public String lastName;
  public String middleName;
  public String dateOfBirth;
  public Integer sex;

  public Contact() {
    this.id = null;
    this.email = null;
    this.firstName = null;
    this.lastName = null;
    this.middleName = null;
    this.dateOfBirth = null;
    this.sex = null;
  }

  public Contact(
    Integer id,
    String email,
    String firstName,
    String lastName,
    String middleName,
    String dateOfBirth,
    Integer sex
  ) {
    this.id = id;
    this.email = email;
    this.firstName = firstName;
    this.lastName = lastName;
    this.middleName = middleName;
    this.dateOfBirth = dateOfBirth;
    this.sex = sex;
  }
}

@@ -15,16 +15,44 @@
 ample;%0A%0A
+import java.util.ArrayList;%0A
 import j
@@ -92,16 +92,16 @@
 lement;%0A
-
 %0A@XmlRoo
@@ -307,16 +307,54 @@
 ger sex;
+%0A  public ArrayList%3CProfile%3E profiles;
 %0A%0A  publ
@@ -542,16 +542,42 @@
 = null;%0A
+    this.profiles = null;%0A
   %7D%0A%0A  p
@@ -911,16 +911,16 @@
 fBirth;%0A
-
     this
@@ -931,14 +931,40 @@
  = sex;%0A
+    this.profiles = null;%0A
   %7D%0A%7D%0A

Make profiles list null by default