mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 修复 QuestDb CodeFirst AutoSubtableAttribute/ColumnAttribute判断bug
This commit is contained in:
parent
5e256922e6
commit
2d16aec7c5
@ -182,8 +182,10 @@ namespace FreeSql.QuestDb
|
|||||||
if (timeAttr != null)
|
if (timeAttr != null)
|
||||||
{
|
{
|
||||||
var ckey = propety.Name;
|
var ckey = propety.Name;
|
||||||
|
//如果存在Column.Name
|
||||||
var colNameAttr = propety.GetCustomAttribute<ColumnAttribute>();
|
var colNameAttr = propety.GetCustomAttribute<ColumnAttribute>();
|
||||||
if (!string.IsNullOrWhiteSpace(colNameAttr?.Name))
|
if (!string.IsNullOrWhiteSpace(colNameAttr?.Name))
|
||||||
|
//则以Column中的Name为主
|
||||||
ckey = colNameAttr.Name;
|
ckey = colNameAttr.Name;
|
||||||
var colName = tb.Columns.FirstOrDefault(it => it.Key == ckey).Value;
|
var colName = tb.Columns.FirstOrDefault(it => it.Key == ckey).Value;
|
||||||
sbalter.Append(
|
sbalter.Append(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user