title: GORM Auto-increments primary key even if data wasnt inserted into DB
body: <p><a href="https://i.stack.imgur.com/TQsVY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TQsVY.png" alt="enter image description here" /></a></p>
  <p>I have the following table <code>channels</code> in my db with <code>id</code> being primary key and <code>telegram_id</code> being unique.
  If I try to run this code:</p>
  <pre><code>db.Create(&amp;models.Channel{
          TelegramID: 5,
          Title:      &quot;ok&quot;,
      })
  </code></pre>
  <p>it won't be inserted into db and the duplicate entry error will be logged in console.
  However if I change <code>TelegramID</code> to be different (for example &quot;6&quot;) and run the code, it will insert with ID being equal to 11, not to 10.
  <a href="https://i.stack.imgur.com/m8rUq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8rUq.png" alt="enter image description here" /></a></p>
  <p>How can I make it not to auto-increment ID when the data is not inserted?</p>