Hi everyone,
Sorry, another question for you! I'm using the following code to create a set of projectors so I can project onto an entity collection, as I need to have a groupby/having clause - even though the resultset itself is just the entity fields:
List<IDataValueProjector> valueProjectors = new List<IDataValueProjector>(entityFields.Count);
foreach (EntityField2 entityField in entityFields)
{
valueProjectors.Add(new DataValueProjector(entityField.Alias, entityField.FieldIndex, entityField.DataType));
}
DataProjectorToIEntityCollection2 projector = new DataProjectorToIEntityCollection2(entityCollection);
da.FetchProjection(valueProjectors, projector, entityFields, relations, 0, null, groupByClause, true, 1, 10);
which works great. Except when one of the columns in the entity is an integer column set up to automatically convert to an enum. Is there any way to do this, without getting in to a whole load of special cases building up a projection that ideally I shouldn't be having to build in the first place?
Cheers