Improving JPA support