From ea83dec21497149dc9ce4dc8d8128f8053e94ceb Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Sun, 22 Nov 2015 09:35:18 +0800 Subject: [PATCH] Use false to decline antuincrement --- model_struct.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_struct.go b/model_struct.go index 13768a18..4ea821d6 100644 --- a/model_struct.go +++ b/model_struct.go @@ -439,7 +439,7 @@ func (scope *Scope) generateSqlTag(field *StructField) string { if field.IsPrimaryKey { autoIncrease = true } - if v == "NO" { + if v == "FALSE" { autoIncrease = false }