title: JPA: how to map SQL Server uniqueidentifier type
body: <p>I've inherited a SQL Server database that I'm trying to map via JPA. Many of the tables have a <code>uniqueidentifier</code> column. I'm trying to map them like so:</p>
  
  <pre><code>@Id
  @GenericGenerator(name = "generator", strategy = "guid", parameters = {})
  @GeneratedValue(generator = "generator")
  @Column(name = "APPLICATION_ID")
  private String id;
  </code></pre>
  
  <p>Hibernate complains with:</p>
  
  <pre><code>Found: uniqueidentifier, expected: varchar(255)
  </code></pre>