Hi folks! Does exposed not have a way to set defau...
# exposed
m
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
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
Why is there no documentation for these stuff?
a
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
Welp! Thanks for your comment.