mirror of https://github.com/go-gorm/gorm.git
Update README
This commit is contained in:
parent
84942c60b8
commit
ee48d6986c
|
@ -595,7 +595,7 @@ db.Model(&user).Related(&profile)
|
||||||
### Has Many
|
### Has Many
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// User belongs to a profile, ProfileID is the foreign key
|
// User has many emails, UserID is the foreign key
|
||||||
type User struct {
|
type User struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
Emails []Email
|
Emails []Email
|
||||||
|
|
Loading…
Reference in New Issue