From 1936549a66f66929ce72eefcd7a79dbcef9b8e89 Mon Sep 17 00:00:00 2001 From: Apurva Chitnis Date: Thu, 21 Feb 2019 11:27:58 +0000 Subject: [PATCH] use non-default foreign key in example --- documents/associations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documents/associations.md b/documents/associations.md index 595f1fef..bc39d752 100644 --- a/documents/associations.md +++ b/documents/associations.md @@ -47,8 +47,8 @@ type Profile struct { type User struct { gorm.Model - Profile Profile `gorm:"foreignkey:ProfileID;association_foreignkey:Refer"` - ProfileID int + Profile Profile `gorm:"foreignkey:ProfileRefer;association_foreignkey:Refer"` + ProfileRefer int } ```