mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 修复 pgsql DbFirst 未正确获取 Position 值;#1154
This commit is contained in:
		@@ -259,7 +259,6 @@ where {loc8.ToString().Replace("a.table_name", "ns.nspname || '.' || c.relname")
 | 
			
		||||
                ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
 | 
			
		||||
                if (ds == null) return loc1;
 | 
			
		||||
 | 
			
		||||
                var position = 0;
 | 
			
		||||
                foreach (object[] row in ds)
 | 
			
		||||
                {
 | 
			
		||||
                    var object_id = string.Concat(row[0]);
 | 
			
		||||
@@ -309,7 +308,7 @@ where {loc8.ToString().Replace("a.table_name", "ns.nspname || '.' || c.relname")
 | 
			
		||||
                        Table = loc2[object_id],
 | 
			
		||||
                        Comment = comment,
 | 
			
		||||
                        DefaultValue = defaultValue,
 | 
			
		||||
                        Position = ++position
 | 
			
		||||
                        Position = attnum
 | 
			
		||||
                    });
 | 
			
		||||
                    loc3[object_id][column].DbType = this.GetDbType(loc3[object_id][column]);
 | 
			
		||||
                    loc3[object_id][column].CsType = this.GetCsTypeInfo(loc3[object_id][column]);
 | 
			
		||||
 
 | 
			
		||||
@@ -273,7 +273,6 @@ where {loc8.ToString().Replace("a.table_name", "ns.nspname || '.' || c.relname")
 | 
			
		||||
                ds = _orm.Ado.ExecuteArray(CommandType.Text, sql);
 | 
			
		||||
                if (ds == null) return loc1;
 | 
			
		||||
 | 
			
		||||
                var position = 0;
 | 
			
		||||
                foreach (object[] row in ds)
 | 
			
		||||
                {
 | 
			
		||||
                    var object_id = string.Concat(row[0]);
 | 
			
		||||
@@ -324,7 +323,7 @@ where {loc8.ToString().Replace("a.table_name", "ns.nspname || '.' || c.relname")
 | 
			
		||||
                        Table = loc2[object_id],
 | 
			
		||||
                        Comment = comment,
 | 
			
		||||
                        DefaultValue = defaultValue,
 | 
			
		||||
                        Position = ++position
 | 
			
		||||
                        Position = attnum
 | 
			
		||||
                    });
 | 
			
		||||
                    loc3[object_id][column].DbType = this.GetDbType(loc3[object_id][column]);
 | 
			
		||||
                    loc3[object_id][column].CsType = this.GetCsTypeInfo(loc3[object_id][column]);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user