}
public void testFloatId() {
ClassMetaData cmd = repo.getMetaData(FloatIdEntity.class, null, true);
try {
JPAFacadeHelper.toOpenJPAObjectId(cmd, new FloatIdEntity());
fail("Didn't fail!");
} catch (UserException re) {
// expected
}
Float id = Float.valueOf(1);
FloatIdEntity entity = new FloatIdEntity();
entity.setId(id);
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
em.persist(entity);
em.getTransaction().commit();
em.clear();
FloatIdEntity persistedEntity = em.find(FloatIdEntity.class, id);
StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) persistedEntity).pcGetStateManager());
Object oid = smi.getObjectId();
assertEquals(oid, JPAFacadeHelper.toOpenJPAObjectId(cmd, id));
}