I'm using 2.1.6 with DB2 8.1 and would like to use the uuid.hex scheme as a CHAR(32) instead of a VARCHAR(32), for performance reasons.
I've tried using a UserType with this:
Code:
public int[] sqlTypes() {
return new int[] { Types.CHAR };
}
public Class returnedClass() {
return String.class;
}
But it just creates a column of CHAR(1). Adding a <column> element to my mapping does not work either:
Code:
<id
name="id"
type="com.webify.csa.hibernate.IDType"
length="32"
unsaved-value="null"
>
<column
name="id"
not-null="true"
sql-type="char(32)"
/>
<generator class="uuid.hex">
</generator>
</id>
Is this possible?