This project is read-only.

AuditPropertyResolver when field is null

Nov 26, 2010 at 10:26 PM

The AuditPropertyResolver works GREAT on FK fields. I love being able to see meaningful data in the audit, rather than just the IDs.

There's only one situation with which I have problems: if there's a field that is permitted to be NULL by definition.

Example: I have a field in Customers named AffiliateOfCustomerId. It's a self-join ... it contains the CustomerId of its parent company.

If I include AffiliateOfCustomerId in AuditPropertyResolver , and it's NULL ... then I get an 'Object Not Found' error.

This is one of the few FK that is not a required field.

Is there a way to check for a non-NULL value prior to resolving the field?