2 Replies Latest reply on Nov 22, 2007 8:05 AM by Tom Baeyens

    converting a float to a double for persistence

    Tom Baeyens Master

      when converting a float to a double for persistence and back again, i get the following problem:

      ASSERTION FAILURE: expected:<78.65> but was:<78.6500015258789>

      should we map a float to it's string representation instead ? that might be harder to compare or sort in the db.

      or do you think that we can put the float and the double on the same column ?

      in that case, the conversion is left to the db driver. statement.setFloat(int, float); maybe that gives better results ?

      any other ideas ?