fix goctl model (#61)

This commit is contained in:
miaogaolin
2020-09-11 16:46:45 +08:00
committed by GitHub
parent e1d942a799
commit ce5961a7d0
4 changed files with 19 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ func genDelete(table Table, withCache bool) (string, error) {
}
var containsIndexCache = false
for _, item := range table.Fields {
if item.IsKey && !item.IsPrimaryKey {
if item.IsUniqueKey {
containsIndexCache = true
break
}