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

Manasseh

11/15/2023, 12:51 AM
Hi folks! Does exposed not have a way to set default values at the model level? More like a function that is called on object save or something
a

Andrew O'Hara

11/15/2023, 5:26 AM
Column<T>.default
and
Column<T>.defaultExpression
can be used to set a default in the schema, but you can also use
Column<T>.clientDefault
to generate the default programmatically by the client on save.
m

Manasseh

11/15/2023, 4:46 PM
Why is there no documentation for these stuff?
a

Andrew O'Hara

11/15/2023, 5:23 PM
Exposed has always been a bit under-maintained. But now that there are some full-time developers, I'm sure it will get better. It's also fairly simple to discover these features yourself 🤷 . The best docs is the code!
m

Manasseh

11/15/2023, 7:12 PM
Welp! Thanks for your comment.
5 Views