Hi,
im wondering why searching entities by using em.find is quite expensive in contrast to a named query.
The code:
Ball b = em.find(Ball.class, 34);
Query q = em.createQuery("SELECT Object(o) FROM Ball o WHERE id=:id"); q.setParameter("id", 34); Ball b = q.getSingleResult();