This commit is contained in:
Andrey Deryabin 2016-10-10 11:59:43 +03:00
parent 7fcc575363
commit 1273d39feb
No known key found for this signature in database
GPG Key ID: 14B1E328DF305A10

View File

@ -52,7 +52,7 @@ db.Set("gorm:save_associations", false).Create(&user)
### Default Values
You could define default value in the `gorm` tag, then the inserting SQL will ignore these fields that has default value and its value is blank, and after insert the record into databae, gorm will load those fields's value from database.
You could define default value in the `gorm` tag, then the inserting SQL will ignore these fields that has default value and its value is blank, and after insert the record into database, gorm will load those fields's value from database.
```go
type Animal struct {