public void setUp() {
super.setUp(AllFieldTypes.class, CLEAR_TABLES,
"openjpa.Compatibility", "JPQL=warn");
AllFieldTypes pc1 = new AllFieldTypes();
AllFieldTypes pc2 = new AllFieldTypes();
AllFieldTypes pc3 = new AllFieldTypes();
AllFieldTypes pc4 = new AllFieldTypes();
// pc1 and pc2, pc3 and pc4 grouped on intField, shortField
pc1.setIntField(1);
pc1.setShortField((short) -1);
pc2.setIntField(1);
pc2.setShortField((short) -1);
pc3.setIntField(2);
pc3.setShortField((short) -2);
pc4.setIntField(2);
pc4.setShortField((short) -2);
// pc1 and pc2 grouped on stringField
pc1.setStringField("abc");
pc2.setStringField("acd");
pc3.setStringField("def");
pc4.setStringField("efg");
// pc2 and pc3 grouped on byteField
pc2.setByteField((byte) 1);
pc3.setByteField((byte) 1);
pc1.setByteField((byte) 0);
pc4.setByteField((byte) 2);
// longField is unique id
pc1.setLongField(1L);
pc2.setLongField(2L);
pc3.setLongField(3L);
pc4.setLongField(4L);
// set up some relations
pc1.setSelfOneOne(pc4);
pc2.setSelfOneOne(pc3);
pc3.setSelfOneOne(pc2);
pc4.setSelfOneOne(pc1);
// if variable testing, set up some 1-Ms instead of the 1-1s above
if (getName().startsWith("testVariable")) {
pc1.setSelfOneOne(pc1);
pc2.setSelfOneOne(pc1);
pc1.getSelfOneMany().add(pc1);
pc1.getSelfOneMany().add(pc2);
pc3.setSelfOneOne(pc3);
pc4.setSelfOneOne(pc3);
pc3.getSelfOneMany().add(pc3);
pc3.getSelfOneMany().add(pc4);
}
EntityManager em = emf.createEntityManager();