JetBrains / Exposed

Kotlin SQL Framework
http://jetbrains.github.io/Exposed/
Apache License 2.0
8.27k stars 690 forks source link

fix(DoubleColumnType): correctly handle precision when casting Float to DoubleColumnType for a `real` column #2115

Closed jackgisel-RL closed 3 months ago

jackgisel-RL commented 3 months ago

we found an issue when casting values from the DB to a DoubleColumnType when the underlying column was a real

isolated example

Problem

image

Solution

image

bug found in prod

db had this:

image

when debugging through the value was represented as a Float, shown here:

image image

the data is coming back as Float because the Postgres column is a real and not a double precision