Please try the following:
Test1 t1=new Test1();
| ArrayList<Test2> a=new ArrayList<Test2>();
| Test2 t2=new Test2();
| t2.setField(1);entityManager.persist(t2);a.add(t2);
| t2=new Test2();
| t2.setField(2);entityManager.persist(t2);a.add(t2);
| t1.setTest2s(a);
| t1.setField(1);
| entityManager.persist(t1);
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956852#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...