Merge pull request #211 from 0x76long/0x76long-patch-1

修复因大小写导致找不到表主键的问题
This commit is contained in:
孟帅
2025-11-07 12:44:11 +08:00
committed by GitHub

View File

@@ -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
}
}