File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
hibernate-core/src/main/java/org/hibernate/type Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,12 @@ public abstract class AbstractStandardBasicType<T>
64
64
// by DynamicParameterizedTypes.
65
65
private SqlTypeDescriptor sqlTypeDescriptor ;
66
66
private JavaTypeDescriptor <T > javaTypeDescriptor ;
67
+ // sqlTypes need always to be in sync with sqlTypeDescriptor
68
+ private int [] sqlTypes ;
67
69
68
70
public AbstractStandardBasicType (SqlTypeDescriptor sqlTypeDescriptor , JavaTypeDescriptor <T > javaTypeDescriptor ) {
69
71
this .sqlTypeDescriptor = sqlTypeDescriptor ;
72
+ this .sqlTypes = new int [] { sqlTypeDescriptor .getSqlType () };
70
73
this .javaTypeDescriptor = javaTypeDescriptor ;
71
74
}
72
75
@@ -141,9 +144,10 @@ public final void setJavaTypeDescriptor( JavaTypeDescriptor<T> javaTypeDescripto
141
144
public final SqlTypeDescriptor getSqlTypeDescriptor () {
142
145
return sqlTypeDescriptor ;
143
146
}
144
-
147
+
145
148
public final void setSqlTypeDescriptor ( SqlTypeDescriptor sqlTypeDescriptor ) {
146
149
this .sqlTypeDescriptor = sqlTypeDescriptor ;
150
+ this .sqlTypes = new int [] { sqlTypeDescriptor .getSqlType () };
147
151
}
148
152
149
153
public final Class getReturnedClass () {
@@ -155,7 +159,7 @@ public final int getColumnSpan(Mapping mapping) throws MappingException {
155
159
}
156
160
157
161
public final int [] sqlTypes (Mapping mapping ) throws MappingException {
158
- return new int [] { sqlTypeDescriptor . getSqlType () } ;
162
+ return sqlTypes ;
159
163
}
160
164
161
165
@ Override
You can’t perform that action at this time.
0 commit comments