Audit Trial - selected fields from references / references instead of their values

I wonder if there is a smart way to make Audit Trial, which is a super tool for tracking changes, not go so crazy with the size of the database :) A great feature, of course, is to save only the changed values as long as they are in the entity. However, when it comes to references the problem is already more complex. First, it saves unchanged references and second, and worse, it saves all the values of the associated entity from the reference. This means no less than that if the entity that is being recorded has many references, and these references have many fields then every change causes a huge increase in the database with the saved changes. In the case of my project, the matter is so complicated that the entity I want to analyze with Audit Trial itself has 10 attributes, but is associated with a dozen or so other entities, which sometimes have even 30 attributes - each change of the entity results in saving all the values from the associated entity, so the data becomes monstrously large and the database swells (especially since Audit Trial also saves unchanged references). However, I would like to have knowledge that someone has changed this reference (e.g. changed the user who owns the project). By the way, in my application, these references are usually used (80% of them) to specify values from a (fairly fixed) list of values as a list. But not only that. I see two solutions to this: 1) creating references in ReferenceLog with both old and previous references from the main entity 2) storing only one selected value from the associated entity (for example, only "ID") and then retrieving the value on demand based on the ID Without this, my database will explode very quickly :) Have you solved a similar problem or do you have any ideas on how to save the database? I saw on the forum that someone, in order not to save the unchanged references, simply edited the java code Audit Trial but I won't get into that anymore :)
1 answers

Hi Luckas, 

I understand your problem. 

I run schedule events everyday to delete the unnecssary logs clearing the DB space. 

also, you can find some insights in the below post