I take it that its still not possible to add to the fieldsCollection.
I think this is what I need, and it seems there are other people. Could I request this be added to the llb TODO list?
protected override IEntityFields CreateFields()
{
IEntityFields toReturn = base.CreateFields();
toReturn.Expand(1);
IEntityField IsPolicyValid = new EntityField("IsPolicyValid", SqlFunctionFactory.IsPolicyValid(SomeEntityFields.SomeEntityId));
toReturn.DefineField(IsPolicyValid, (int)SomeEntityFieldIndexExt.IsPolicyValid);
return toReturn;
}
In the mean time, could you explain this?
In the SqlServer DQE, you could modify the insert DQ creation routine by adding some code which tests if the field in question has an Expression set. If so, skip the field (inserts need this, for updates it should still work). Be aware that the index is used in both the fields and the persistence info and from that point on doesn't match anymore so you need 2 indexes.