Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
olmobrutall committed Jun 5, 2020
2 parents 80f596b + 80f7a65 commit b8280ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Signum.Engine/Schema/Schema.Basics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public partial class FieldPrimaryKey : Field, IColumn
bool IColumn.PrimaryKey { get { return true; } }
public bool Identity { get; set; }
bool IColumn.IdentityBehaviour { get { return table.IdentityBehaviour; } }
int? IColumn.Size { get { return null; } }
public int? Size { get; set; }
int? IColumn.Scale { get { return null; } }
public string? Collation { get; set; }
Table? IColumn.ReferenceTable { get { return null; } }
Expand Down Expand Up @@ -840,7 +840,7 @@ public partial class FieldReference : Field, IColumn, IFieldReference
public bool PrimaryKey { get; set; } //For View
bool IColumn.Identity { get { return false; } }
bool IColumn.IdentityBehaviour { get { return false; } }
int? IColumn.Size { get { return null; } }
int? IColumn.Size { get { return this.ReferenceTable.PrimaryKey.Size; } }
int? IColumn.Scale { get { return null; } }
public Table ReferenceTable { get; set; }
Table? IColumn.ReferenceTable => ReferenceTable;
Expand Down
1 change: 1 addition & 0 deletions Signum.Engine/Schema/SchemaBuilder/SchemaBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ protected virtual Field GenerateFieldPrimaryKey(Table table, PropertyRoute route
UserDefinedTypeName = pair.UserDefinedTypeName,
Default = attr.GetDefault(Settings.IsPostgres),
Identity = attr.Identity,
Size = attr.HasSize ? attr.Size : (int?)null,
};
}

Expand Down

0 comments on commit b8280ae

Please sign in to comment.