From b7edaeeeb3d72c27ea719d9462c7b6f1774dd11c Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Wed, 18 Feb 2015 13:37:27 +0800 Subject: [PATCH] Test ID as foreign key --- structs_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/structs_test.go b/structs_test.go index 3bf76f3f..3d864592 100644 --- a/structs_test.go +++ b/structs_test.go @@ -19,13 +19,13 @@ type User struct { UpdatedAt time.Time // UpdatedAt: Time of record is updated, will be updated automatically Emails []Email // Embedded structs BillingAddress Address // Embedded struct - BillingAddressId sql.NullInt64 // Embedded struct's foreign key + BillingAddressID sql.NullInt64 // Embedded struct's foreign key ShippingAddress Address // Embedded struct ShippingAddressId int64 // Embedded struct's foreign key CreditCard CreditCard Latitude float64 Languages []Language `gorm:"many2many:user_languages;"` - CompanyId int64 + CompanyID int64 Company Company Role PasswordHash []byte