title: How do I set an integer column to null while updating the model object?
body: <p>Suppose I have model class as follows</p>
  <pre><code>type Catalog struct {
      Title            string    `gorm:&quot;column:title&quot; json:&quot;title&quot;`
      Description      string    `gorm:&quot;column:description&quot; json:&quot;description&quot;`
      FeaturedMediumID uint      `gorm:&quot;column:featured_medium_id&quot; json:&quot;featured_medium_id&quot; sql:&quot;DEFAULT:NULL&quot;`
      FeaturedMedium   *Medium   `gorm:&quot;foreignkey:featured_medium_id;association_foreignkey:id&quot;  json:&quot;featured_medium&quot;`
      PublishedDate    time.Time `gorm:&quot;column:published_date&quot; json:&quot;published_date&quot;`
      Products         []Product `gorm:&quot;many2many:catalog_product;&quot; json:&quot;products&quot;`
  }
  </code></pre>
  <p>Now when I POST to create object at that time the value of FeaturedMediumID is set to NULL in database if I pass 0 in request body. But after that if I update it to some value and then again want to unset the value than it does not allow.</p>
  <p>I can set it to NULL by following query</p>
  <pre><code>DB.Model(catalog).Updates(map[string]interface{}{&quot;featured_medium_id&quot;: nil}).First(&amp;catalog).Error
  </code></pre>
  <p>But I want to do it directly in <code>.Updates()</code> query. Is there any way to do that? If I set it to 0 it does not work.</p>