Department d3 = context.newObject(Department.class);
d3.setName("d3");
context.commitChanges();
Manager m1 = context.newObject(Manager.class);
m1.setName("m1");
m1.setPersonType("EM");
Manager m2 = context.newObject(Manager.class);
m2.setName("m2");
m2.setPersonType("EM");
Manager m3 = context.newObject(Manager.class);
m3.setName("m3");
m3.setPersonType("EM");
Address a1 = context.newObject(Address.class);
m1.addToAddresses(a1);
Address a2 = context.newObject(Address.class);
m2.addToAddresses(a2);
Address a3 = context.newObject(Address.class);
m3.addToAddresses(a3);
d1.addToEmployees(m1);
d1.addToEmployees(m2);
d3.addToEmployees(m3);