title: How to get updated output using raw sql builder in gorm
body: <p><strong>I'm trying to get my updated post in to a struct in the below function</strong></p>
  <pre><code>    func UpdatePost(c *gin.Context) {
      id := c.Param(&quot;id&quot;)
  
      var body struct {
          Title    string
          PostText string
          Img string
      }
      c.Bind(&amp;body)
  
      var post models.Post
  
      initializers.DB.Raw(&quot;UPDATE posts SET title = ?, post_text = ?, img = ? WHERE id = ?&quot;, body.Title, body.PostText, body.Img, id).Scan(&amp;post)
      c.JSON(http.StatusOK, gin.H{
          &quot;post&quot;: post,
      })
  }
  </code></pre>
  <p>My Post is being successfully updated in DB but
  <strong>even after using Scan(), my struct looks like this</strong></p>
  <pre><code>&quot;post&quot;: {
      &quot;ID&quot;: 0,
      &quot;title&quot;: &quot;&quot;,
      &quot;postText&quot;: &quot;&quot;,
      &quot;img&quot;: &quot;&quot;,
      &quot;userName&quot;: &quot;&quot;,
      &quot;likedBy&quot;: null,
      &quot;createdBy&quot;: 0,
  }
  </code></pre>
  <p>What's the way to go here?</p>