Change from old hibernate to JPA