File tree Expand file tree Collapse file tree
Orm/Xtensive.Orm/Orm/Model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Copyright (C) 2007-2020 Xtensive LLC.
1+ // Copyright (C) 2007-2022 Xtensive LLC.
22// This code is distributed under MIT license terms.
33// See the License.txt file in the project root for more information.
44// Created by: Dmitri Maximov
@@ -38,7 +38,7 @@ public sealed class TypeInfo : SchemaMappedNode
3838 /// </summary>
3939 public const int MinTypeId = 100 ;
4040
41- private ColumnInfoCollection columns ;
41+ private readonly ColumnInfoCollection columns ;
4242 private readonly FieldMap fieldMap ;
4343 private readonly FieldInfoCollection fields ;
4444 private readonly TypeIndexInfoCollection indexes ;
@@ -747,8 +747,8 @@ private bool GetIsLeaf()
747747
748748 private void CreateTupleDescriptor ( )
749749 {
750- var orderedColumns = columns . OrderBy ( c => c . Field . MappingInfo . Offset ) ;
751- columns = new ColumnInfoCollection ( this , "Columns" ) ;
750+ var orderedColumns = columns . OrderBy ( c => c . Field . MappingInfo . Offset ) . ToList ( ) ;
751+ columns . Clear ( ) ;
752752 columns . AddRange ( orderedColumns ) ;
753753 TupleDescriptor = TupleDescriptor . Create (
754754 Columns . Select ( c => c . ValueType ) . ToArray ( Columns . Count ) ) ;
You can’t perform that action at this time.
0 commit comments