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 77import java .sql .DatabaseMetaData ;
88import java .sql .SQLException ;
99import java .sql .Types ;
10+ import java .util .Set ;
1011
1112import org .hibernate .PessimisticLockException ;
1213import org .hibernate .boot .model .FunctionContributions ;
5960public class MariaDBDialect extends MySQLDialect {
6061 private static final DatabaseVersion MINIMUM_VERSION = DatabaseVersion .make ( 10 , 5 );
6162 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+ );
6273
6374 public MariaDBDialect () {
6475 this ( MINIMUM_VERSION );
@@ -158,7 +169,7 @@ public JdbcType resolveSqlTypeDescriptor(
158169 }
159170 break ;
160171 case VARBINARY :
161- if ( "GEOMETRY" . equals ( columnTypeName ) ) {
172+ if ( GEOMETRY_TYPE_NAMES . contains ( columnTypeName ) ) {
162173 jdbcTypeCode = GEOMETRY ;
163174 }
164175 break ;
You can’t perform that action at this time.
0 commit comments