quentinjs wrote:
Regarding URL: http://www.llblgen.com/documentation/2.6/Using%20the%20generated%20code/gencode_auditing.htm
There is a line:
**Be sure that audit entities don't reference normal entities which are new or changed. **This is because the save logic will do a graph sort and the audit entities would make entities which might have been deleted already to be inserted again.
By "normal" the docs mean "entities that don't store audit information. For example "Customer" table is normal and "AuditInfo" is audit table.
So, if at some method of the audit process you relate a normal entity with an audit entity (for example newAuditInfo.TheCustomer = involvedEntity) and later you delete the customer, it still exists as a related object of the audit entity. When the audit entities are saved, this will cause the customer to be saved if it is new or has been changed. So according to the docs you have to avoid this.