title: Hibernate database schema validation fails for H2 database when entity contains UUID
body: <p>For a <strong>H2 database schema</strong> mapping to an <strong>entity with a UUID</strong>, the <strong>Hibernate ddl validation fails</strong> with the <strong>exception</strong>:</p>
  
  <blockquote>
    <p>Root cause: org.hibernate.tool.schema.spi.SchemaManagementException:
    Schema-validation: wrong column type encountered in column [testuuid]
    in table [<code>TEST</code>.<code>dummy</code>]; found [varbinary (Types#VARBINARY)], but
    expecting [binary (Types#BINARY)]</p>
  </blockquote>
  
  <p>Setup:</p>
  
  <ul>
  <li>Hibernate 5.2.9.Final</li>
  <li>H2 1.4.194</li>
  </ul>
  
  <p>further hibernate settings: </p>
  
  <ul>
  <li>hibernate.hbm2ddl.auto=validate</li>
  <li>Database dialect is not set explicitly.</li>
  </ul>
  
  <p>The H2 DDL is initially generated with hibernate resulting in the <strong>UUID being represented by 'binary'</strong> in the H2 database schema.</p>
  
  <p><em>Disabling the validation works, but is not an option.</em></p>
  
  <p><strong>How can I solve this issue?</strong></p>