em.close();
}
public void testStringDiscriminators() {
EntityManager em = emf.createEntityManager(); // load the types
Discriminator discrim = getMapping("StringAbstractEntity")
.getDiscriminator();
assertEquals("StringAbstractEntity", discrim.getValue()); // Generated
assertEquals(JavaTypes.STRING, discrim.getJavaType());
discrim = getMapping("strLeaf").getDiscriminator();
assertEquals("strLeaf", discrim.getValue());
assertEquals(JavaTypes.STRING, discrim.getJavaType());
discrim = getMapping("StringRootEntity").getDiscriminator();
assertEquals("StringRoot", discrim.getValue());
assertEquals(JavaTypes.STRING, discrim.getJavaType());
StringLeafEntity leaf = new StringLeafEntity();
StringRootEntity root = new StringRootEntity();
em.getTransaction().begin();
em.persist(leaf);