title: How to generate id when there are composite keys in entity Spring Boot?
body: <p>How to generate id when there are composite keys in entity spring boot, I have make composite primary key using <code>IdClass</code> but it don't go well when I try to insert generated value from Spring Boot</p>
  <pre class="lang-java prettyprint-override"><code>@Entity
  @DynamicUpdate
  @DynamicInsert
  @Table(name = &quot;tm_trx_flow&quot;)
  @IdClass(TmTrxFlowSerializable.class)
  public class TmTrxFlow {
      @Id
      @Column(name =&quot;tm_trx_procedure_id&quot;)
      private Integer tmTrxProcedureId;
      
      @Id     
      @SequenceGenerator(name = &quot;some_seq&quot;, sequenceName = &quot;empid_seq&quot;)
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = &quot;some_seq&quot;)
      @Column(name=&quot;tm_trx_flow_id&quot;)
      private Integer tmTrxFlowId;
      
  }
  </code></pre>