title: Postgresql UUID supported by Hibernate?
body: <p>I can't get Hibernate working with java.util.UUID for PostgreSQL.</p>
  
  <p>Here is the mapping using javax.persistence.* annotations:</p>
  
  <pre><code>private UUID itemUuid;
  
  @Column(name="item_uuid",columnDefinition="uuid NOT NULL")
  public UUID getItemUuid() {
      return itemUuid;
  }
  
  public void setItemUuid(UUID itemUuid) {
      this.itemUuid = itemUuid;
  }
  </code></pre>
  
  <p>When persisting a transient object I get a SQLGrammarException:</p>
  
  <pre><code>column "item_uuid" is of type uuid but expression is of type bytea at character 149
  </code></pre>
  
  <p>PostgreSQL version is 8.4.4<br>
  JDBC driver - 8.4.4-702 (also tried 9.0 - same thing)<br>
  Hibernate version is 3.6, main configuration properties:<br></p>
  
  <pre><code>&lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.PostgreSQLDialect&lt;/property&gt;
  &lt;property name="hibernate.connection.driver_class"&gt;org.postgresql.Driver&lt;/property&gt;
  &lt;property name="hibernate.connection.url"&gt;jdbc:postgresql://192.168.1.1/db_test&lt;/property&gt;
  </code></pre>