mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 修复 QuestDb CodeFirst AutoSubtableAttribute/ColumnAttribute判断bug
This commit is contained in:
		@@ -181,7 +181,11 @@ namespace FreeSql.QuestDb
 | 
			
		||||
                        var timeAttr = propety.GetCustomAttribute<AutoSubtableAttribute>();
 | 
			
		||||
                        if (timeAttr != null)
 | 
			
		||||
                        {
 | 
			
		||||
                            var colName = tb.Columns.FirstOrDefault(it => it.Key == propety.Name).Value;
 | 
			
		||||
                            var ckey = propety.Name;
 | 
			
		||||
                            var colNameAttr = propety.GetCustomAttribute<ColumnAttribute>();
 | 
			
		||||
                            if (!string.IsNullOrWhiteSpace(colNameAttr?.Name))
 | 
			
		||||
                                ckey = colNameAttr.Name;
 | 
			
		||||
                            var colName = tb.Columns.FirstOrDefault(it => it.Key == ckey).Value;
 | 
			
		||||
                            sbalter.Append(
 | 
			
		||||
                                $" TIMESTAMP({colName.Attribute.Name}) PARTITION BY {timeAttr.SubtableType};{Environment.NewLine}");
 | 
			
		||||
                        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user