fix: types in m2m
This commit is contained in:
10
common/model_methods.go
Normal file
10
common/model_methods.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package common
|
||||
|
||||
func (model *Model) HasPrimaryKey() bool {
|
||||
for _, field := range model.Fields {
|
||||
if field.Tags.HasParam("primaryKey") || field.Tags.HasOption("primaryKey") {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user