From 667a91283ddce3da7c100c45614dc738d61672fd Mon Sep 17 00:00:00 2001 From: szjay <419645+szjay@users.noreply.gitee.com> Date: Wed, 10 Apr 2019 16:55:46 +0800 Subject: [PATCH] no commit message --- CodeGenerator/CodeGeneratorForm.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CodeGenerator/CodeGeneratorForm.cs b/CodeGenerator/CodeGeneratorForm.cs index 5ee94db..903a35e 100644 --- a/CodeGenerator/CodeGeneratorForm.cs +++ b/CodeGenerator/CodeGeneratorForm.cs @@ -306,6 +306,7 @@ where a.name = '{0}'"; private string GetProperties(List tableFieldList) { + bool isMultiKey = false; //是否是多主键。 string properties = ""; string sql = ReplaceMarco(); @@ -330,7 +331,8 @@ where a.name = '{0}'"; if (tableFieldInfo.PrimaryKey && tableFieldInfo.TableName == txtMainTable.Text) { - properties += "\t\t[Key]\r\n"; + //properties += "\t\t[Key]\r\n"; + properties += string.Format("\t\t[Key, Column(Order = {0})]\r\n", tableFieldInfo.ColumnId); } else if (tableFieldInfo.Name.ToLower() == "version") { -- GitLab