title: Patching object with Gorm. Initial NULL integer is now 0
body: <p>I am patching a row in Postgres DB with Gorm:</p>
  <pre><code>type Meter struct {
      ID            string `json:&quot;id&quot; gorm:&quot;primary_key;column:id_meter&quot;`
      OperationID   uint   `json:&quot;operation_id,omitempty&quot; gorm:&quot;column:id_operation&quot;`
      Pack          uint   `json:&quot;pack,omitempty&quot; gorm:&quot;column:pack&quot;`
  }
  
  
  func PatchMeter(w http.ResponseWriter, r *http.Request) {
      w.Header().Set(&quot;Content-Type&quot;, &quot;application/json&quot;)
      db := SetupDB()
      defer db.Close()
      var meter models.Meter
      s, _ := ioutil.ReadAll(r.Body)
      err = json.Unmarshal(s, &amp;meter)
      db.Save(&amp;meter)
  }
  </code></pre>
  <p>The body I send in my PATCH request is:</p>
  <pre><code>{ &quot;id&quot;: &quot;55&quot;,
    &quot;operation_id&quot;: 8,
    &quot;pack&quot;: &quot;&quot;,
  }
  </code></pre>
  <p>Thing is pack has a default to NULL, and having pack 0 is very different from having pack <code>NULL</code></p>
  <p>As parsing between value and uint field is &quot;automatic&quot;, I don't see how can I make a difference between 0 and NULL in DB.</p>