If we have a column that's supposed to be a `@Koma...
# komapper
d
If we have a column that's supposed to be a
@KomapperUpdatedAt
but it's recorded as an Int (unix time stamp), can komapper handle that? Maybe kotlinx.datetime's Instant?
t
Komapper cannot handle an Int as a
@KomapperUpdatedAt
clumn.
@KomapperUpdatedAt
is supported for the following types: - java.time.Instant - java.time.LocalDateTime - java.time.OffsetDateTime - kotlinx.datetime.Instant - kotlinx.datetime.LocalDateTime
d
Any way to get it to work with some kind of adapter?
t
Currently, no.
d
I would have expected that a
Copy code
DataTypeConverter<Instant, Int>
would support this... since in the end I'm mapping to an Instant in the data class...?
t
Komapper processes
@KomapperUpdatedAt
and generates timestamp assignment code at compile-time for efficiency, so Komapper cannot use
DataTypeConverter<Instant, Int>
which is runtime information.