mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-13 04:33:44 +08:00
修复因大小写导致找不到表主键的问题
This commit is contained in:
@@ -143,7 +143,7 @@ func GetPkField(ctx context.Context, dao daoInstance) (string, error) {
|
||||
}
|
||||
|
||||
for _, field := range fields {
|
||||
if field.Key == "PRI" {
|
||||
if strings.ToUpper(field.Key) == "PRI" {
|
||||
return field.Name, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user