8586878889909192939495
p.setItem(item); item.setProduct(p); } } em.persist(s); Person person = new Person("Test Result Shape"); em.persist(person); Foo foo = new Foo(100L, "Test Foo"); Bar bar = new Bar(200L, "Test Bar"); foo.setBar(bar);
6061626364656667686970
em.getTransaction().commit(); } void createData() { em.getTransaction().begin(); Person p = new Person("Test Result Shape"); em.persist(p); Foo foo = new Foo(100L, "Test Foo"); Bar bar = new Bar(200L, "Test Bar"); foo.setBar(bar);
8485868788899091929394