We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7204a0a commit 6c6e9beCopy full SHA for 6c6e9be
1 file changed
Orm/Xtensive.Orm/Orm/Model/TypeInfo.cs
@@ -67,7 +67,11 @@ public sealed class TypeInfo : SchemaMappedNode
67
private List<AssociationInfo> overridenAssociations;
68
private FieldInfo typeIdField;
69
70
- public TypeInfo Ancestor { get; internal set; }
+ private TypeInfo ancestor;
71
+ public TypeInfo Ancestor {
72
+ get => ancestor;
73
+ internal set => ancestor = ancestor == null ? value : throw Exceptions.AlreadyInitialized(nameof(Ancestor));
74
+ }
75
76
/// <summary>
77
/// Gets the ancestors recursively. Inheritor-to-root order.
0 commit comments