Does a hook for intercepting Save, Delete, UpdateMulti exist in LLBLGen?

Posts   
 
    
AlexP
User
Posts: 17
Joined: 24-Jan-2020
# Posted on: 14-Oct-2022 08:54:35   

Hi, we are looking for a way to never forget to set audit columns / not having to be aware of them.

These are columns that hold 'creation date', 'last change date', 'deletion date' (in case of soft/logical delete) and or by who the records have been changed.

Is there an easy way for intercepting Save, Delete, UpdateMulti so we can automagically set these values? So check IsNew or IsDirty, etc ... and then fill the appropriate columns? Preferably even change a 'Delete' into an Update when an entity uses soft/logical delete.

We are using both, Adapter and Self-Servicing.

Thanks in advance, Alexander

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 14-Oct-2022 12:42:09   
Frans Bouma | Lead developer LLBLGen Pro
AlexP
User
Posts: 17
Joined: 24-Jan-2020
# Posted on: 14-Oct-2022 13:33:38   

Thanks, I didn't know this existed ... yet I imagined there must have been something, couldn't imagine you'd 'forget' about something like this.

Will have a look at how to shoehorn this into our implementation. The example is creating new 'audit' entities as sort of a journal I'd guess.

I think we should just change some fields on the specified entity.