Update models.md
Incorrect syntax.
This commit is contained in:
parent
84fe98b1d6
commit
08c6a5ad0b
@ -164,7 +164,7 @@ Save records having `UpdatedAt` field will set it to current time.
|
||||
|
||||
```go
|
||||
db.Save(&user) // will set `UpdatedAt` to current time
|
||||
db.Model(&user).Update("name", "jinzhu") // will set `UpdatedAt` to current time
|
||||
db.Model(&user).Update("UpdatedAt", time.Now()) // will set `UpdatedAt` to current time
|
||||
```
|
||||
|
||||
### Use `DeletedAt` to store record's deleted time if field exists
|
||||
|
Loading…
x
Reference in New Issue
Block a user