Open mauvaisetroupe opened 2 years ago
Why not using a CDC (change data capture) mechanism?
https://vladmihalcea.com/the-best-way-to-implement-an-audit-log-using-hibernate-envers/
An idea. Triggers can be used in order to create an SCD structure, and they are independent from the code. SCD-4/5 (a “history” table for each object/dimension table) can be used for tracing and it would not break any current ORM setup. So for example this feature would only be available when on Oracle but not on some H2.
But the SCD-2 (new rows in same tables with “end date”) would be better if a feature like “time travel” is needed. Scd-2 would have an impact on current orm mappings, though. Then, thinking about it, is time travel (i.e. “show me yesterday’s state”) really usefull in EA? Perhaps only for tracing. What SCD-2 would really be great for is showing different phasings or releases in the FUTURE!
When a update or insert is done on :
Maybe a validation?
This mechanism could be used to store metadata on entities (last update date)