MctUsers user = new MctUsers();
user.setUserId(userId);
user.setDisciplineId(group);
em.persist(user);
ComponentSpec mysandboxComponentSpec = new ComponentSpec();
updateComponentSpec(mysandbox, mysandboxComponentSpec, em, true);
em.persist(mysandboxComponentSpec);
TagAssociationPK tagAssociationPK = new TagAssociationPK();
tagAssociationPK.setComponentId(mysandbox.getComponentId());
tagAssociationPK.setTagId("bootstrap:creator");
TagAssociation tagAssociation = new TagAssociation();
tagAssociation.setTagAssociationPK(tagAssociationPK);
em.persist(tagAssociation);
ComponentSpec dropboxComponentSpec = new ComponentSpec();
updateComponentSpec(dropbox, dropboxComponentSpec, em, true);
em.persist(dropboxComponentSpec);
ComponentSpec userDropboxes = em.find(ComponentSpec.class, userDropboxesId);
userDropboxes.getReferencedComponents().add(dropboxComponentSpec);
mysandboxComponentSpec.getReferencedComponents().add(dropboxComponentSpec);
em.persist(userDropboxes);
em.persist(mysandboxComponentSpec);
em.getTransaction().commit();