mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
[Table Designer] Fix a few computed col issues (#1518)
This commit is contained in:
@@ -825,7 +825,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
columnViewModel.IsPrimaryKey.Enabled = true; // To be consistent with SSDT, any column can be a primary key.
|
||||
columnViewModel.Type.Value = column.DataType;
|
||||
columnViewModel.Type.Enabled = column.CanEditDataType;
|
||||
columnViewModel.Type.Values = tableDesigner.DataTypes.ToList();
|
||||
columnViewModel.Type.Values = column.DataTypes.ToList();
|
||||
columnViewModel.AdvancedType.Value = column.AdvancedDataType;
|
||||
columnViewModel.AdvancedType.Enabled = column.CanEditDataType;
|
||||
columnViewModel.AdvancedType.Values = column.AdvancedDataTypes.ToList();
|
||||
|
||||
@@ -473,11 +473,11 @@ namespace Microsoft.SqlTools.ServiceLayer.TableDesigner
|
||||
{
|
||||
var table = designer.TableViewModel;
|
||||
var errors = new List<TableDesignerIssue>();
|
||||
if (!table.IsEdge && table.Columns.Items.Count == 0)
|
||||
if (!table.IsEdge && table.Columns.Items.Where(c => !c.IsComputed).Count() == 0)
|
||||
{
|
||||
errors.Add(new TableDesignerIssue()
|
||||
{
|
||||
Description = "A table must have at least one column defined."
|
||||
Description = "A table must have at least one non-computed column defined."
|
||||
});
|
||||
}
|
||||
return errors;
|
||||
|
||||
Reference in New Issue
Block a user