Improve JPA custom types.