Corrections on the database schema and JPA mapping