// given
final String name = "testCreateJoinCriteriaQuery";
final String nameOne = name + "-one";
final String nameMany = name + "-many";
Parent parent = new Parent(name);
parent.setOne(new OneToOne(nameOne));
parent.add(new OneToMany(nameMany));
entityManager.persist(parent);
entityManager.flush();