This commit is contained in:
2881099
2022-01-15 09:56:01 +08:00
parent 3a453d918d
commit 9bde42a566
6 changed files with 51 additions and 40 deletions

View File

@ -475,14 +475,14 @@ where {loc8.ToString().Replace("a.table_name", "ns.nspname || '.' || d.relname")
var inkey = string.Concat(row[7]).Split(' ');
var attnum = int.Parse(string.Concat(row[8]));
attnum = int.Parse(inkey[attnum - 1]);
foreach (string tc in loc3[object_id].Keys)
{
if (loc3[object_id][tc].DbTypeText.EndsWith("[]"))
{
column = tc;
break;
}
}
//foreach (string tc in loc3[object_id].Keys) //bug: https://github.com/2881099/FreeSql.Wiki.VuePress/issues/9
//{
// if (loc3[object_id][tc].DbTypeText.EndsWith("[]"))
// {
// column = tc;
// break;
// }
//}
if (loc3.ContainsKey(object_id) == false || loc3[object_id].ContainsKey(column) == false) continue;
var loc9 = loc3[object_id][column];
if (loc9.IsPrimary == false && is_primary_key) loc9.IsPrimary = is_primary_key;