diff --git a/notifier_twitter.go b/notifier_twitter.go index 560e056..4456db9 100644 --- a/notifier_twitter.go +++ b/notifier_twitter.go @@ -21,7 +21,7 @@ type Tweet struct { gorm.Model TweetID int64 ProductURL string - Product Product `gorm:"foreignKey:ProductURL"` + Product Product `gorm:"not null;references:URL"` } // TwitterNotifier to manage notifications to Twitter