You have, of course, several options to implement audit trails.

If you want to stay 100% sure to catch all updates, database triggers are
your best way to go, here.

Otherwise, from a jOOQ perspective, RecordListener is the easiest to help
you implement audit trails, although it will limit your application design
by enforcing all updates to go via UpdatableRecord.store() and similar.

While you could delve into a harder-to-implement, yet possibly more
reliable solution based on VisitListeners, there will always be cases
involving bulk DML that you won't be able to catch, and that can be covered
using triggers, only:

- MERGE statement
- INSERT .. SELECT statements
- Multi-row UPDATE statements

*If others want to share their actual experience, I think that would be
very interesting for the group.*

Hope this helps,
Lukas


2014-09-25 18:25 GMT+02:00 <[email protected]>:

> Hummm, It seems to be better with RecordListener which permit to have the
> complete record and the modification.
>
> Le jeudi 25 septembre 2014 17:29:03 UTC+2, [email protected] a écrit :
>
>> Hello,
>>
>> Do you know what is the best way for doing Audit trail with Jooq ? I
>> think ExecuteListener can be good solution, but if someone has already
>> implemented this, It could help me a lot.
>>
>> Is there a way to catch fields that have been updated after a update
>> statement ?
>>
>> Thanks for your helps.
>>
>> Alex
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to