Hi Lukas,
Cloning is a nice idea..
I agree with the db size blow up due to audit trail. However I have a work around here , might not be the best solution but it's easy to do..
Create a new entity say Entity B assuming the Entity for which you wanted audit is Entity A. Entity B- A would be 1-1 association ..
Create a string attribute say C in the entity B to store the associated values.. meaning every change in association will change the string C
Do audit trail on entity B.
On version of A report. Fetch associated B and it's audit and report it.
I think the big question is: What are you using it for, and how can you make that easier?
Assuming it is mainly as a security fallback, what about:
Assuming every object would have a UUID,
generating a CSV or JSON string:
EntityName: {1}, Attr1 {2}, Attr2 {3} Association1 {4}, etc.
Any time an entity changes, you log who changed it, when, and the new values.
For historical purposes, you could see what entity changed and when, as for the relationships, that could also be logged via UUID.
You would need something smart to extract and view it, but if it is for security fallback, this should work