P E N C I L
Login
JPA
  1. Standard-alone
    1. Use: javax.persistence.EntityManagerFactory instead of org.hibernate.SessionFactory
    2. EntityManagerFactory entityManagerFactory.createEntityManager()
      .createNativeQuery("SELECT :who FROM dual")
      .setParameter("who", who)
      .getSingleResult()
      .toString();
  2. Spring:
    @PersistenceContext EntityMaanger em;