LLBLGen Pro. Version 2.6 Final (May 15th 2009)
Runtime Version: 2.6.9.616
Given the following pseudoish code
public class FieldAuditor: AuditorBase {
public override void AuditEntityFieldSet(IEntityCore entity, int fieldIndex, object originalValue) {
//record the changes...
_auditInfoEntities.Add(auditInfo);
}
}
//---
entity.AuditorToUse = new FieldAuditor();
entity.Field1 = "New Value";
entity.Field2 = "Different Value";
entity.Felds[(int)EntityFieldIndex.Field1].CancelEdit();
adapter.SaveEntity(entity);
Will the auditor end up saving an auditInfo record for both Field1 and Field2? I haven't tested an isolated case yet, but it seems like the CancelEdit does not also cancel the auditInfo for Field1.
What is the expected behavior in this case? If the expected behavior is NOT to also cancel the auditInfo for the field, what is the best way to make sure that the auditInfo record will not be saved for fields which have had the Edit Canceled?