Hi, I've been working on a project using exposed f...
# exposed
w
Hi, I've been working on a project using exposed for a bit and was wondering if there is any convenience functionality for audit fields like created & updated timestamps or soft delete logic with a deleted column? If so, is it documented anywhere? If not, are there any plans/issues for adding it, (but just super low priority)? Didn't want to reinvent the wheel here if I didn't have to.
k
Hey, something like that is not included. For how to auto-fill a created and updated timestamp you can look at this example: https://github.com/PaulMuriithi/ExposedDatesAutoFill/blob/master/src/main/kotlin/app/Models.kt And this pattern of a BaseEntity could also be used for a deleted column.
w
@Kenneth Wußmann didn't know about that EntityHook is that documented anywhere? Thanks, this does exactly what I need and that inheritance pattern is pretty great.