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:
// all the references reachable from these objects will be made persistent
System.out.println( "make persistent the project1 " + project1.toString());
pm.makePersistent(project1);
System.out.println( "make persistent the project2 " + project2.toString());
pm.makePersistent(project2);
pm.currentTransaction().commit();
pm.close();
}