Hi,
I am trying to add auditing support to my application but have run up against a problem that someone else may have experienced.
I have a table named Property, which contains a PropertyStatusID field that references a lookup table, PropertyStatus (ID, Name). So each property can be associated with a status by its ID.
When a PropertyEntity is saved, I am using an Auditor to record any changes to its fields to a separate table. So far so good. But when a property's status changes, I record that its PropertyStatusID field has changed (for example, from 2 to 4). This isn't very descriptive for users - I would like to be able to record the name from the lookup table - to say, for example, that the status has changed from "Pending" to "Live". I cannot find a way to get at this information from within the Auditor, as it would require making a database call to fetch the lookup value, and the Auditor has no DataAccessAdapter to use. The related lookup entity is not fetched from the database with the Property entity, as the client keeps its own cached list of lookup values. The entity is being saved in a WCF service.
Does anyone have any ideas how to accomplish this or even if it can be done? I am using Adapter templates, LLBLGen v2.5, .NET 3.5.
Thanks in advance,
Dan