Merge pull request #1403 from liubin/patch-1

Add lost backslash
This commit is contained in:
Jinzhu 2017-03-28 10:03:31 +08:00 committed by GitHub
commit 7341d7e101

View File

@ -166,6 +166,7 @@ Save records having `UpdatedAt` field will set it to current time.
// Whenever one or more `user` fields are edited using Save() or Update(), `UpdatedAt` will be set to current time // Whenever one or more `user` fields are edited using Save() or Update(), `UpdatedAt` will be set to current time
db.Save(&user) // will set `UpdatedAt` to current time 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("name", "jinzhu") // will set `UpdatedAt` to current time
```
### Use `DeletedAt` to store record's deleted time if field exists ### Use `DeletedAt` to store record's deleted time if field exists