File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
hibernate-core/src/main/java/org/hibernate/type/descriptor/java Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 7
7
package org .hibernate .type .descriptor .java ;
8
8
9
9
import java .io .Serializable ;
10
+ import java .sql .Types ;
10
11
import java .util .UUID ;
11
12
12
13
import org .hibernate .internal .util .BytesHelper ;
13
14
import org .hibernate .type .descriptor .WrapperOptions ;
15
+ import org .hibernate .type .descriptor .spi .JdbcRecommendedSqlTypeMappingContext ;
16
+ import org .hibernate .type .descriptor .sql .SqlTypeDescriptor ;
14
17
15
18
/**
16
19
* Descriptor for {@link UUID} handling.
@@ -32,6 +35,11 @@ public UUID fromString(String string) {
32
35
return ToStringTransformer .INSTANCE .parse ( string );
33
36
}
34
37
38
+ @ Override
39
+ public SqlTypeDescriptor getJdbcRecommendedSqlType (JdbcRecommendedSqlTypeMappingContext context ) {
40
+ return context .getTypeConfiguration ().getSqlTypeDescriptorRegistry ().getDescriptor ( Types .VARCHAR );
41
+ }
42
+
35
43
@ SuppressWarnings ({ "unchecked" })
36
44
public <X > X unwrap (UUID value , Class <X > type , WrapperOptions options ) {
37
45
if ( value == null ) {
You can’t perform that action at this time.
0 commit comments