Hi everyone, is it possible to add this typecast i...
# exposed
s
Hi everyone, is it possible to add this typecast in custom ColumnType before inserting value to database ?
c
Hi @Sahit Sadono Depending on the logic in your custom
ColumnType
, a good place to add the type cast would be in
nonNullValueToString()
, something like:
Copy code
override fun nonNullValueToString(value: Any): String {
    return "${super.nonNullValueToString(value)}::geography"
}
This should add the typecast whenever an input value is provided to the column for processing before being sent to the database, so inserts and updates.
s
hi @Chantal Loncle , thank you so much. it works
👍 1