https://kotlinlang.org logo
Title
h

hyukchan

01/26/2019, 8:41 PM
Not helping me 😕
r

robstoll

01/26/2019, 8:43 PM
what is the type of b?
p

Pavlo Liapota

01/26/2019, 8:47 PM
It says
Column<DateTime>
and not
Column<DateTime?>
, so I guess it does not accept nullable values.
h

hyukchan

01/26/2019, 8:48 PM
I'm using Exposed API
var b = date("b_column")
org.jetbrains.exposed.sql.Table public final fun date( name: String ): Column<DateTime>
g

gcx11

01/26/2019, 8:49 PM
@hyukchan var b = date("b_column").nullable()
❤️ 1
r

robstoll

01/26/2019, 8:50 PM
O don't know the exposed API but I had the same guess as @Pavlo Liapota that the type is not
Column<DateTime?>
you need to make your column nullable. I am sure this is somehow possible.
h

hyukchan

01/26/2019, 8:50 PM
oh ok !
Thanks a lot for your help all, especially @gcx11 who gave me the solution 🙂
Where did you find that "nullable()" trick ? It's not on the official documentation, is it ?
g

gcx11

01/26/2019, 9:20 PM
@hyukchan https://github.com/JetBrains/Exposed/blob/master/README.md And I thought it could done be this way