[Table Designer] Fix a few computed col issues (#1518)

This commit is contained in:
Hai Cao
2022-06-01 15:00:01 -07:00
committed by GitHub
parent 9a341c6bd9
commit 33636efa87
2 changed files with 3 additions and 3 deletions

View File

@@ -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;