Closed thosakwe closed 3 years ago
@thosakwe commented:
Question - does the generated migration file also have decimal
? Or float
? IIRC I specifically added the DECIMAL
casts because the postgres
library returned doubles as strings (not sure if it still does this, but didn't want to fix what wasn't broken).
@kevinelliott commented:
I don't use the migrations (database is defined elsewhere), so I can't say there. Postgres returns the FLOAT as a number not a string.
@kevinelliott commented:
@thosakwe Any further update here?
@thosakwe commented:
Sorry, won't be able to do much this week, as I have final exams.
@kevinelliott commented:
OK understandable, I will fork and make some kind of correction for myself in the meantime. Thanks.
@thosakwe commented:
Feel free to send in a PR if you get it fixed on your end.
This issue was originally created by @kevinelliott here, before being automatically moved: https://github.com/angel-dart-archive/orm/issues/101
On the Dart side, I have a model that has
double
attributes, and it is defined with a column type offloat
:On the PostgreSQL side, I have these columns as
FLOAT
.However, when the insert occurs, I see in the SQL debug that it is casting to DECIMAL.
These values never seem to make it into the DB.