use non-default foreign key in example

This commit is contained in:
Apurva Chitnis 2019-02-21 11:27:58 +00:00 committed by GitHub
parent 46d24b77a4
commit 1936549a66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,8 +47,8 @@ type Profile struct {
type User struct { type User struct {
gorm.Model gorm.Model
Profile Profile `gorm:"foreignkey:ProfileID;association_foreignkey:Refer"` Profile Profile `gorm:"foreignkey:ProfileRefer;association_foreignkey:Refer"`
ProfileID int ProfileRefer int
} }
``` ```