mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-14 05:03:49 +08:00
修复因大小写导致找不到表主键的问题
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user