Skip to content

Commit 2541d4f

Browse files
committed
IndexColumn name is defined on creation
Fixes issue when some columns aren't indexed by name
1 parent eca9bb0 commit 2541d4f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Orm/Xtensive.Orm/Sql/Model/IndexColumn.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public bool Ascending
9090
/// <value></value>
9191
public override string Name
9292
{
93-
get { return !expression.IsNullReference() ? string.Empty : column.Name; }
93+
get { return base.Name; }
9494
set { throw new NotSupportedException(); }
9595
}
9696

@@ -142,13 +142,15 @@ void IPairedNode<Index>.UpdatePairedProperty(string property, Index value)
142142
#region Constructors
143143

144144
internal IndexColumn(Index index, DataTableColumn column, bool ascending)
145+
: base(column.Name)
145146
{
146147
Column = column;
147148
Index = index;
148149
this.ascending = ascending;
149150
}
150151

151152
internal IndexColumn(Index index, SqlExpression expression, bool ascending)
153+
: base(string.Empty)
152154
{
153155
this.expression = expression;
154156
Index = index;

0 commit comments

Comments
 (0)