修复因大小写导致找不到表主键的问题

This commit is contained in:
vlong
2025-11-07 11:41:13 +08:00
committed by GitHub
parent 7313d22cdb
commit c94184a385

View File

@@ -143,7 +143,7 @@ func GetPkField(ctx context.Context, dao daoInstance) (string, error) {
} }
for _, field := range fields { for _, field := range fields {
if field.Key == "PRI" { if strings.ToUpper(field.Key) == "PRI" {
return field.Name, nil return field.Name, nil
} }
} }