Update README

This commit is contained in:
Jinzhu 2014-07-09 10:18:07 +08:00
parent 3bd5131132
commit bdaecff30d
1 changed files with 3 additions and 6 deletions

View File

@ -201,6 +201,9 @@ db.AutoMigrate(User{})
```go
user := User{Name: "jinzhu", Age: 18, Birthday: time.Now()}
db.Save(&user)
// create with predefined primary key
db.Create(&User{Id: 999, Name: "user 999"})
```
### NewRecord
@ -237,12 +240,6 @@ db.Save(&user)
//// COMMIT;
```
### Create With Predefined Primary key
```go
db.Create(&User{Id: 999, Name: "user 999"})
```
## Query
```go