title: What should be the data type of for id?
body: <p>Okay so I have a entity class Person:</p>
  
  <pre><code>@Table(name = "person")
  public class Person {
      @Id
      @Column(name = "id")
      @GeneratedValue(strategy = GenerationType.AUTO)
      private int id;    // -------&gt; Integer or int??                                
      @Column(name = "managerID")
      private  int managerID;
      @Column(name = "name")
      private  String name;
      @Column(name = "externalID")
      private  UUID externalID;
  
  
      public Person(long managerID, String name) {
          this.managerID = managerID;
          this.name = name;
          this.externalID = UUID.randomUUID();;
      }
  }
  </code></pre>
  
  <p>Ideally what should be the data type for id of an entity, I am using SQL(RDBMS).
  Should it be int or Integer? And id Integer, what problems could int give rise to?</p>