Query typeQuery = entityManager.createNamedQuery(RepoRelationshipType.QUERY_FIND_BY_NAME);
typeQuery.setParameter("name", relationshipTypeName);
RepoRelationshipType relationshipType = (RepoRelationshipType) typeQuery.getSingleResult();
RepoRelationship repoRelationship = new RepoRelationship();
repoRelationship.setRelatedRepo(relatedRepo);
repoRelationship.setRepoRelationshipType(relationshipType);
repoRelationship.addRepo(repo);
entityManager.persist(repoRelationship);
relatedRepo.addRepoRelationship(repoRelationship);
RepoRepoRelationship repoRepoRelationship = new RepoRepoRelationship(repo, repoRelationship);