public void testPersist() throws Exception {
getDbHelper().deleteAll("SecondaryTable");
getDbHelper().deleteAll("PrimaryTable");
SecondaryTableEntity o1 = new SecondaryTableEntity();
o1.setPrimaryTableProperty("p1");
o1.setSecondaryTableProperty("s1");
getEntityManager().persist(o1);
getEntityManager().getTransaction().commit();
assertTrue(o1.getId() > 0);
assertEquals("p1", getDbHelper().getObject("PrimaryTable", "primaryTableProperty"));
assertEquals("s1", getDbHelper().getObject("SecondaryTable", "secondaryTableProperty"));
assertEquals(o1.getId(), getDbHelper().getObject("SecondaryTable", "id"));
}