improved JPA utilities