title: "Has many" relation giving empty result
body: <p>I am trying to define one to many relation with gorm ORM . I have read all the docs over and over again . Could not find a way to do it.</p>
  
  <pre><code>func GetUser1(c *gin.Context) {
      var user models.User
      var activities models.UserActivity
      query := DB.Debug().Find(&amp;user, 1).Model(&amp;user).Related(&amp;activities).Error
      if query != nil {
          panic(query)
      }
      c.JSON(200, &amp;user)
  }
  </code></pre>
  
  <p>My Models are ..</p>
  
  <pre><code>type User struct {
      Id       int64
      Username string
      Password string `json:"-"`
      Email    string `json:",omitempty"`
      UserActivities []UserActivity
  }
  type UserActivity struct {
      Id         int64
      UserId     int64 `json:"-"`
      ActorId    int64
      CreatedAt  time.Time
  }
  </code></pre>
  
  <p>Debug Results are </p>
  
  <pre><code>[2015-11-21 22:21:54]  [3.17ms]  SELECT  * FROM `users`  WHERE (`id` = '1')
  [2015-11-21 22:21:54]  [1.39ms]  SELECT  * FROM `user_activities`  WHERE (`user_id` = '1')
  </code></pre>
  
  <p>But I am getting null results</p>
  
  <pre><code>{
      "Id": 1,
      "Username": "test1",
      "Email": "test1@friesen.com",
      "UserActivities": null
  }
  </code></pre>
  
  <p>All the primary keys and Indexes are right . I have also tried puttin <code>gorm:"primary_key"</code> and <code>sql:"index"</code> in <code>UserActivities</code> no luck so far .
   However if I replace <code>UserActivities []UserActivity</code> with <code>UserActivities UserActivity</code> then i get only one row which seems to be right but why <code>UserActivities []UserActivity</code> giving no results </p>