In DictionaryStrategy.cs, shouldn't we allow for the column name to be renamed?
This is what the code looks like right now:
int count = reader.FieldCount;
for (int i = 0; i < count; i++)
{
ResultProperty property = new ResultProperty();
property.PropertyName = "value";
property.ColumnIndex = i;
property.TypeHandler =
request.DataExchangeFactory.TypeHandlerFactory.GetTypeHandler(reader.GetFieldType(i));
dictionary.Add(
reader.GetName(i), // always get the true column name ???
property.GetDataBaseValue(reader));
}
Should it look something more like this:
IDictionary dictionary = (IDictionary) outObject;
if (request.CurrentResultMap != null)
{
for (int i=0;i<request.CurrentResultMap.Properties.Count;i++)
{
ResultProperty property = request.CurrentResultMap.Properties[i];
dictionary.Add(
property.PropertyName,
property.GetDataBaseValue(reader));
}
}
else
{
// original for loop
}