diff --git a/documentation/src/main/asciidoc/userguide/chapters/query/spatial/Spatial.adoc b/documentation/src/main/asciidoc/userguide/chapters/query/spatial/Spatial.adoc index ab983d02fa..441bdb783b 100644 --- a/documentation/src/main/asciidoc/userguide/chapters/query/spatial/Spatial.adoc +++ b/documentation/src/main/asciidoc/userguide/chapters/query/spatial/Spatial.adoc @@ -192,7 +192,7 @@ The `GEOGRAPHY` type is not currently supported. ==== CockroachDB:: -The dialect `CockroachDB202` support the `GEOMETRY` type in CockroachDB v20.2 and later. +The dialect `CockroachDB` support the `GEOMETRY` type in CockroachDB v20.2 and later. [NOTE] ==== diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java index 1338e6fa28..09d0ac3fc7 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/HSMessageLogger.java @@ -29,9 +29,6 @@ public interface HSMessageLogger extends BasicLogger { HSMessageLogger LOGGER = Logger.getMessageLogger( HSMessageLogger.class, LOGGER_NAME ); - boolean TRACE_ENABLED = LOGGER.isTraceEnabled(); - boolean DEBUG_ENABLED = LOGGER.isDebugEnabled(); - @LogMessage(level = INFO) @Message(value = "hibernate-spatial integration enabled : %s", id = 80000001) void spatialEnabled(boolean enabled); diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/contributor/ContributorResolver.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/contributor/ContributorResolver.java index eb08503399..ef330959d0 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/contributor/ContributorResolver.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/contributor/ContributorResolver.java @@ -37,9 +37,15 @@ class ContributorResolver { static ContributorImplementor resolveSpatialtypeContributorImplementor(ServiceRegistry serviceRegistry) { JdbcServices jdbcServices = serviceRegistry.getService( JdbcServices.class ); Dialect dialect = jdbcServices.getDialect(); - for ( Class dialectClass : CONTRIBUTOR_MAP.keySet() ) { - if ( dialectClass.isAssignableFrom( dialect.getClass() ) ) { - return CONTRIBUTOR_MAP.get( dialectClass ).apply( serviceRegistry ); + Function creator = + CONTRIBUTOR_MAP.get( dialect.getClass() ); + if ( creator != null ) { + creator.apply( serviceRegistry ); + } + for ( Map.Entry, Function> entry : + CONTRIBUTOR_MAP.entrySet() ) { + if ( entry.getKey().isAssignableFrom( dialect.getClass() ) ) { + return entry.getValue().apply( serviceRegistry ); } } return null; diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG10Dialect.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG10Dialect.java index 38232141b5..7490d95b34 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG10Dialect.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG10Dialect.java @@ -22,7 +22,7 @@ public class PostgisPG10Dialect extends PostgreSQLDialect { } public PostgisPG10Dialect() { - super( 100 ); + super( 1000 ); } } diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG93Dialect.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG93Dialect.java index 7419eb362d..9847b33e4d 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG93Dialect.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG93Dialect.java @@ -23,7 +23,7 @@ public class PostgisPG93Dialect extends PostgreSQLDialect { } public PostgisPG93Dialect() { - super(); + super( 930 ); } public PostgisPG93Dialect(int version) { diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG94Dialect.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG94Dialect.java index 67320f1729..1a0d5a54c3 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG94Dialect.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisPG94Dialect.java @@ -23,7 +23,7 @@ public class PostgisPG94Dialect extends PostgreSQLDialect { } public PostgisPG94Dialect() { - super(); + super( 940 ); } public PostgisPG94Dialect(int version) { diff --git a/hibernate-spatial/src/test/java/org/hibernate/spatial/dialect/hana/TestHANASpatialFunctions.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/dialect/hana/TestHANASpatialFunctions.java index bed0fc6221..65249107fe 100644 --- a/hibernate-spatial/src/test/java/org/hibernate/spatial/dialect/hana/TestHANASpatialFunctions.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/dialect/hana/TestHANASpatialFunctions.java @@ -32,7 +32,7 @@ import org.locationtech.jts.io.WKBWriter; import org.locationtech.jts.io.WKTWriter; import static java.lang.String.format; - +//TODO - see what tests are still needed, when we update/fix the HANA spatial support @RequiresDialect(value = HANASpatialDialect.class, comment = "This test tests the HANA spatial functions not covered by Hibernate Spatial", jiraKey = "HHH-12426") @Ignore @Deprecated