https://kotlinlang.org logo
#exposed
Title
# exposed
m

Matias Rozenblum

06/14/2021, 2:34 PM
Hi everyone! I’m having an issue using Exposed, in my app i’m doing several inserts to a MySQL DB with Exposed, and sometimes instead of inserting the right data, it inserts zeroes on every column. This does not happen on every insert, for testing purposes I made two identical inserts, with the same hardcoded data, and even then one was saved with zeroes on every column while the other was correctly saved. I managed to turn on the Exposed debug logs and saw that the Insert query is formed correctly, even tried copying and executing it by hand on MySQL Workbench and it worked, but when I try via my app, it sometimes stores zeroes, does this happened to anyone before or know what could be de problem? Thanks!
Some pictures about this:
t

tapac

06/14/2021, 5:58 PM
Never heard of this, what Mysql database and driver versions do you use?
m

Matias Rozenblum

06/14/2021, 6:48 PM
Hi Andrey! I think I fixed it, I had a few columns with
.default("")
, tried changing them to
.nullable()
and it seems to have stopped failing for now, i’ll post here if it happens again
👍 1