title: JPA: Override Auto generated ID
body: <p>I have following definition in Employee class</p>
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  @Column(name = &quot;employee_id&quot;)
  private Integer employeeId;
  </code></pre>
  <p>Now I want to import existing employees with existing employee IDs. Even if I set the employee ID before saving, the assigned ID is ignored and auto incremented ID is stored. How do we override this?</p>
  <p>I had similar problem for <em><strong>composite key</strong></em> which has been explained <a href="https://stackoverflow.com/a/63096129/977919">here</a></p>