Is there an equivalent to @PreUpdate from hibernat...
# exposed
w
Is there an equivalent to @PreUpdate from hibernate in Exposed? In my specific use case, I need to change an update to an insert and I used to do that by setting the id to null in the preupdate handler. I'm making an auditable record such that any of it's modifications result in a new record. Could also do it within my design easily if there is a way to check if there is any queued updates and remove them. Then I'd just copy the entity with the intention of inserting it as a new record. If ther is also any way to strictly forbid updates to a record, that'd be great as I don't want to inadvertently modify my audit data. Anyone else have this use case?
e
Afaik there’s no built-in support to any of these, so you need to implement it for yourself. If you are using the Exposed DSL (and not DAO), you have low-level access to pretty much everything (which is not the case for Hibernate).