|
26 | 26 | import org.hibernate.dialect.NullOrdering;
|
27 | 27 | import org.hibernate.dialect.Replacer;
|
28 | 28 | import org.hibernate.dialect.SelectItemReferenceStrategy;
|
| 29 | +import org.hibernate.dialect.VarcharUUIDJdbcType; |
29 | 30 | import org.hibernate.dialect.function.CaseLeastGreatestEmulation;
|
30 | 31 | import org.hibernate.dialect.function.CommonFunctionFactory;
|
31 | 32 | import org.hibernate.dialect.identity.IdentityColumnSupport;
|
|
74 | 75 | import org.hibernate.type.descriptor.jdbc.spi.JdbcTypeRegistry;
|
75 | 76 | import org.hibernate.type.descriptor.sql.DdlType;
|
76 | 77 | import org.hibernate.type.descriptor.sql.internal.CapacityDependentDdlType;
|
| 78 | +import org.hibernate.type.descriptor.sql.internal.DdlTypeImpl; |
77 | 79 | import org.hibernate.type.descriptor.sql.spi.DdlTypeRegistry;
|
78 | 80 | import org.hibernate.type.spi.TypeConfiguration;
|
79 | 81 |
|
|
91 | 93 | import static org.hibernate.type.SqlTypes.TIMESTAMP;
|
92 | 94 | import static org.hibernate.type.SqlTypes.TIMESTAMP_WITH_TIMEZONE;
|
93 | 95 | import static org.hibernate.type.SqlTypes.TINYINT;
|
| 96 | +import static org.hibernate.type.SqlTypes.UUID; |
94 | 97 | import static org.hibernate.type.SqlTypes.VARBINARY;
|
95 | 98 | import static org.hibernate.type.SqlTypes.VARCHAR;
|
96 | 99 | import static org.hibernate.type.descriptor.DateTimeUtils.JDBC_ESCAPE_END;
|
@@ -216,6 +219,7 @@ protected void registerColumnTypes(TypeContributions typeContributions, ServiceR
|
216 | 219 | .withTypeCapacity( getMaxNVarcharLength(), columnType( NVARCHAR ) )
|
217 | 220 | .build()
|
218 | 221 | );
|
| 222 | + ddlTypeRegistry.addDescriptor( new DdlTypeImpl( UUID, "char(36)", this ) ); |
219 | 223 | }
|
220 | 224 |
|
221 | 225 | @Override
|
@@ -816,5 +820,6 @@ public void contributeTypes(TypeContributions typeContributions, ServiceRegistry
|
816 | 820 | super.contributeTypes( typeContributions, serviceRegistry );
|
817 | 821 | final JdbcTypeRegistry jdbcTypeRegistry = typeContributions.getTypeConfiguration().getJdbcTypeRegistry();
|
818 | 822 | jdbcTypeRegistry.addDescriptor( Types.NCLOB, ClobJdbcType.DEFAULT );
|
| 823 | + typeContributions.contributeJdbcType( VarcharUUIDJdbcType.INSTANCE ); |
819 | 824 | }
|
820 | 825 | }
|
0 commit comments