Esempio n. 1
0
 public static Project create(String name, String folder, String owner) {
   Project project = new Project(name, folder, User.find.ref(owner));
   project.save();
   project.saveManyToManyAssociations("members");
   return project;
 }
Esempio n. 2
0
 /** Remove a member from this project */
 public static void removeMember(Integer project, String user) {
   Project p = Project.find.setId(project).fetch("members", "email").findUnique();
   p.members.remove(User.find.ref(user));
   p.saveManyToManyAssociations("members");
 }