I should probably be putting these in the general forum, as we're now released. Reaaaaally sorry this wasn't found before as we've been running the beta internally for 1 - 1.5 weeks, but started up some new dev work that seems to be hitting new areas:
Seems that when using expressions in dynamic lists the field alias isn't being generated into the output SQL:
<snip>
.DefineField(WorkTaskModelFieldIndex.Name, 4, "Name")
<snip>
Dim nameField As IEntityField2 = fields(4)
Dim taskExp As New Expression(FactoryClasses.EntityFieldFactory.Create(WorkTaskModelFieldIndex.TaskID), ExOp.Add, ": ")
nameField.ExpressionToApply = New Expression(taskExp, ExOp.Add, FactoryClasses.EntityFieldFactory.Create(WorkTaskModelFieldIndex.Name))
Output:
exec sp_executesql N'SELECT DISTINCT
<snip>
([dbo].[WorkTaskModel].[TaskID] + @LO2571) + [dbo].[WorkTaskModel].[Name],
<snip>
N'@LO2571 nvarchar(4000)',
@LO2571 = N': '
<snip>
Sorry for snipping the hell out of the string. I can post the whole thing if you want but it's reasonably long and seemingly irrelevant.
If I remove the expression lines the column gets aliased; if I don't the alias is removed.
Jeff...