We work with legacy database which are saving integer values to the varchar column. We need to map this column to Int32 property and it works well if data in database column are numeric or NULL.
But we have problems if column contains empty string instead of null - nhibernate throws error that it cannot convert it to integer.
Is it possible to configure class mapping to automatically convert all values where the exception raises to some default value (zero in this case)?