Refactoring of some jpa mappings.