Fixes to JPA models