Fixing auto-generated JPA