0

We have some triggers in Oracle database which are used for Auditing purposes and used for before update/insert operations.

We need to replace all triggers with code.

Is it possible to use pre/postUpdate and pre/postPersist lifecycles methods to save objects in table like audit_table1 or audit_table2.

My preference is to use post methods to capture old object(if it possible to get hold of older object in @PostUpdate method; to avoid any extra audit , incase any update fails)

Let me know if it is possible.

Thank you.

Khushi
  • 325
  • 1
  • 11
  • 32
  • So what is the benefit you expect to gain from this exercise? Given that you will get one very big loss: there will be no auditing of database activity which does not go through your Java application. – APC Sep 14 '18 at 06:50
  • I think, there would be no benefit. But we are implementing Bi-directional Golden gate for Oracle database.With triggers, we can have possible duplicates(they might get fired on both the db servers), so we are trying to remove triggers from db and wanted to get same functionality through code(if possible). – Khushi Sep 14 '18 at 07:54

0 Answers0