//create a manager
Manager manager = new Manager("Young Emy", department);
//link the manager to the department
department.setManager(manager);
//create employees
Employee employee1 = new Employee("Truffaz Brad", manager);
Employee employee2 = new Employee("Serio Laura", manager);
Employee employee3 = new Employee("Burley Keith", manager);
Employee employee4 = new Employee("Stern Jan", manager);
//create projects
Project project1 = new Project("Iris");
Project project2 = new Project("Platine");
//assign projects to employees
employee1.addProject(project1);
employee2.addProject(project1);
employee3.addProject(project1);
employee1.addProject(project2);
employee4.addProject(project2);
PersistenceManager pm = pmf.getPersistenceManager();
//store the graph defined above in the datastore
pm.currentTransaction().begin();
//make persistent the 2 projects: