File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
hibernate-core/src/main/java/org/hibernate/dialect Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 7
7
import java .sql .DatabaseMetaData ;
8
8
import java .sql .SQLException ;
9
9
import java .sql .Types ;
10
+ import java .util .Set ;
10
11
11
12
import org .hibernate .PessimisticLockException ;
12
13
import org .hibernate .boot .model .FunctionContributions ;
59
60
public class MariaDBDialect extends MySQLDialect {
60
61
private static final DatabaseVersion MINIMUM_VERSION = DatabaseVersion .make ( 10 , 5 );
61
62
private static final DatabaseVersion MYSQL57 = DatabaseVersion .make ( 5 , 7 );
63
+ private static final Set <String > GEOMETRY_TYPE_NAMES = Set .of (
64
+ "POINT" ,
65
+ "LINESTRING" ,
66
+ "POLYGON" ,
67
+ "MULTIPOINT" ,
68
+ "MULTILINESTRING" ,
69
+ "MULTIPOLYGON" ,
70
+ "GEOMETRYCOLLECTION" ,
71
+ "GEOMETRY"
72
+ );
62
73
63
74
public MariaDBDialect () {
64
75
this ( MINIMUM_VERSION );
@@ -158,7 +169,7 @@ public JdbcType resolveSqlTypeDescriptor(
158
169
}
159
170
break ;
160
171
case VARBINARY :
161
- if ( "GEOMETRY" . equals ( columnTypeName ) ) {
172
+ if ( GEOMETRY_TYPE_NAMES . contains ( columnTypeName ) ) {
162
173
jdbcTypeCode = GEOMETRY ;
163
174
}
164
175
break ;
You can’t perform that action at this time.
0 commit comments