I have two questions about the AuditReferenceOfRelatedEntity method.
1) I have a parent and child table where the child table has a foreign key to the parent that is enforced by the database using the usual referential integrity rules. So here is my thinking:
a. I create a parent entity, save it to the database and refetch to the get the ID.
b. I create a child entity. Add this child to the parent's children and save the child.
The AuditReferenceOfRelatedEntity method does not know of the child's primary key value since it was accessed somewhere between steps a and b above. Obviously I cannot save the child first before assigning the parent. Is there a way AuditReferenceOfRelatedEntity can get access to the child entity primary key value(s)?
2) The mapped field name parameter seems to give me mapped entity name and NOT the mapped field name as the parameter name seem to suggest.
Thanks,
-Luke