As per the subject line, we have a single column in a single entity that we require to return null (not string.Empty) if the database column is actually null. Setting the Project setting ConvertNulledReferenceTypesToDefaultValue to false affects many columns in the project, so we have to fix all the code that uses them to check for null first.
Is there something we can do with a partial class on the Entity, or does it go further, like into the PersistanceInfoProvider? Perhaps a custom attribute on the column?
edit:
So, we effectively want to change the true in this code to false:
public virtual System.String Key
{
get { return (System.String)GetValue((int)ReportAccessFieldIndex.Key, true); }
set { SetValue((int)ReportAccessFieldIndex.Key, value); }
}
which we could do by hand after generating source code, but that's nasty. What clever tricks am I missing?
Cheers,
Paul