mirror of https://github.com/go-gorm/gorm.git
Update README
This commit is contained in:
parent
3bd5131132
commit
bdaecff30d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue