I am using Hibernate as my JPA provider with it connecting to a Progress database. When a NaN value is persisted it is causing lots of problems - it prevents the row from being read in certain circumstances. Is there a way to hook in to the standard double type persistence to convert NaN (and probably + and - infinity) to a different value? It does not matter if the NaN or infinity information is lost, I just want a readable row!
I know I could do something like this:
@Column(name = "doubleColumn")
public double getDoubleColumn() {
return PersistedDouble.convert(doubleColumn);
}
But I am worried about maintenance as that will have to be manually added for any doubles mapped to the database.