title: Is using id field in @AllArgsConstructor while using Spring JPA correct?
body: <p>Using <code>spring-boot</code> and JPA I have an <code>Entity</code> I want to use lombok to reduce boilerplate code. However in my entity there is the <code>id</code> field. Shall I put it in the constructor arguments with <code>@AllArgsConstructor</code> or shall I eliminate it from theargument list (somehow, how?) due to being auto-generated with the <code>@id</code> and <code>@GeneratedValue</code> annotations?</p>
  
  <p>code:</p>
  
  <pre><code>@Entity
  @NoArgsConstructor // JPA requires empty constructor
  @AllArgsConstructor // ? is id in constuctor needed?
  
  @Getter
  @Setter
  @ToString(exclude = {"room", "customer"})
  public class Reservation {
  
      @Id
      @GeneratedValue
      private long id;
  
      private Room room;
      private Customer customer;
      private Date dateFrom;
      private Date dateTo;    
  }
  </code></pre>