title: "reflect: Field index out of range" panic on update
body: <p>I get a panic implementing a basic update with Gorm and I couldn't find any information about it. Following Gorm's documentation, I'm not looking like doing wrong.</p>
  <pre><code>module achiever
  
  go 1.15
  
  require (
      gorm.io/driver/postgres v1.0.5
      gorm.io/gorm v1.20.7
  )
  </code></pre>
  <pre class="lang-golang prettyprint-override"><code>type Task struct {
      ID    uint   `json:&quot;id&quot; gorm:&quot;primary_key&quot;`
      Title string `json:&quot;title&quot;`
  }
  
  type UpdateTaskInput struct {
      Title string `json:&quot;title&quot;`
  }
  
  func UpdateTask(id uint, input UpdateTaskInput) bool {
      var task Task
      if err := models.DB.Where(&quot;id = ?&quot;, id).First(&amp;task).Error; err != nil {
          return false
      }
  
      models.DB.Model(&amp;task).Updates(input)
  
      return true
  }
  </code></pre>
  <pre><code>reflect: Field index out of range
  /usr/local/go/src/reflect/value.go:854 (0x4bf758)
      Value.Field: panic(&quot;reflect: Field index out of range&quot;)
  /home/raphael/gows/pkg/mod/gorm.io/gorm@v1.20.7/schema/field.go:388 (0x57b984)
      (*Field).setupValuerAndSetter.func1: fieldValue := reflect.Indirect(value).Field(field.StructField.Index[0])
  /home/raphael/gows/pkg/mod/gorm.io/gorm@v1.20.7/callbacks/update.go:230 (0x881670)
      ConvertToAssignments: value, isZero := field.ValueOf(updatingValue)
  /home/raphael/gows/pkg/mod/gorm.io/gorm@v1.20.7/callbacks/update.go:64 (0x87f259)
      Update: if set := ConvertToAssignments(db.Statement); len(set) != 0 {
  /home/raphael/gows/pkg/mod/gorm.io/gorm@v1.20.7/callbacks.go:105 (0x5a65bc)
      (*processor).Execute: f(db)
  /home/raphael/gows/pkg/mod/gorm.io/gorm@v1.20.7/finisher_api.go:303 (0x5ae2c6)
      (*DB).Updates: tx.callbacks.Update().Execute(tx)
  /home/raphael/ws/achiever/server/controllers/tasks.go:74 (0xad62cd)
      UpdateTask: models.DB.Model(&amp;task).Updates(input)
  </code></pre>
  <p>I can't figure out where the error is coming from.</p>