title: Alternative to make primary key column varchar(max)
body: <p>I have a JPA entity which has a string <code>@Id</code> and the length of that id can be very long (6000 or more) in some cases I tried</p>
  
  <pre><code> @Id
   @Column(name = "ID")
   @Lob
   private String id;
  </code></pre>
  
  <p>But after trying I came to know I can't make it <code>varchar(max)</code> in SQL Server (I don't know about other databases).
  Now I want the a solution for this problem. Thanks in advance.</p>