title: Golang's GORM not adding associations to "has many" relationship
body: <p>I just started using <a href="http://gorm.io" rel="nofollow noreferrer">GORM</a> and tried to build a "has many relationship". I'm trying to add an association to Previous.Holdings (I think I followed the <a href="http://gorm.io/docs/associations.html" rel="nofollow noreferrer">docs</a> correctly) but when I try to do a <code>select * from previous</code> I don't see anything showing up in the database. Any idea on what I'm missing.</p>
  
  <pre><code>import (
      orm "github.com/jinzhu/gorm"
      _ "github.com/jinzhu/gorm/dialects/sqlite"
  )    
  
  type Previous struct {
      orm.Model
  
      Holdings []Holding `gorm:"foreignkey:ID"`
  }
  
  type Holding struct {
      ID uint `gorm:"primary_key"`
  
      Symbol string
      PurchaseDate time.Time
      SellDate time.Time
  }
  
  func main() {
      t1, _ := time.Parse("2006-01-02", "2017-06-16")
      h := Holding{
          Symbol: "abc",
          PurchaseDate: t1,
      }
      db.Model(&amp;Previous{}).Association("Holdings").Append(h)
  }
  </code></pre>