}
public void testIntDiscriminators() {
EntityManager em = emf.createEntityManager(); // load the types
Discriminator discrim = getMapping("IntegerAbstractEntity")
.getDiscriminator();
assertEquals(new Integer("IntegerAbstractEntity".hashCode()), discrim
.getValue()); // Generated value
assertEquals(JavaTypes.INT, discrim.getJavaType());
discrim = getMapping("intLeaf").getDiscriminator();
assertEquals(new Integer("intLeaf".hashCode()), discrim.getValue());
assertEquals(JavaTypes.INT, discrim.getJavaType());
discrim = getMapping("IntegerRootEntity").getDiscriminator();
assertEquals(new Integer(10101), discrim.getValue());
assertEquals(JavaTypes.INT, discrim.getJavaType());
IntegerLeafEntity leaf = new IntegerLeafEntity();
IntegerRootEntity root = new IntegerRootEntity();
em.getTransaction().begin();
em.persist(leaf);