From 0351f94761ff7a7977e56b7d1842be3ab8df664d Mon Sep 17 00:00:00 2001 From: Julien Kirch Date: Mon, 9 Oct 2023 12:36:53 +0200 Subject: [PATCH] Upgrade Hibernate version (#726) --- docs-core/pom.xml | 4 ++-- docs-core/src/main/java/com/sismics/util/jpa/EMF.java | 10 +++++----- pom.xml | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs-core/pom.xml b/docs-core/pom.xml index 4decd254..ffe55ce2 100644 --- a/docs-core/pom.xml +++ b/docs-core/pom.xml @@ -17,8 +17,8 @@ - org.hibernate - hibernate-core-jakarta + org.hibernate.orm + hibernate-core diff --git a/docs-core/src/main/java/com/sismics/util/jpa/EMF.java b/docs-core/src/main/java/com/sismics/util/jpa/EMF.java index 401bb424..22015f69 100644 --- a/docs-core/src/main/java/com/sismics/util/jpa/EMF.java +++ b/docs-core/src/main/java/com/sismics/util/jpa/EMF.java @@ -26,7 +26,7 @@ import java.util.Properties; public final class EMF { private static final Logger log = LoggerFactory.getLogger(EMF.class); - private static Map properties; + private static Properties properties; private static EntityManagerFactory emfInstance; @@ -59,7 +59,7 @@ public final class EMF { } } - private static Map getEntityManagerProperties() { + private static Properties getEntityManagerProperties() { // Use properties file if exists try { URL hibernatePropertiesUrl = EMF.class.getResource("/hibernate.properties"); @@ -81,7 +81,7 @@ public final class EMF { String databasePassword = System.getenv("DATABASE_PASSWORD"); log.info("Configuring EntityManager from environment parameters"); - Map props = new HashMap<>(); + Properties props = new Properties(); Path dbDirectory = DirectoryUtil.getDbDirectory(); String dbFile = dbDirectory.resolve("docs").toAbsolutePath().toString(); if (Strings.isNullOrEmpty(databaseUrl)) { @@ -92,7 +92,7 @@ public final class EMF { props.put("hibernate.connection.username", "sa"); } else { props.put("hibernate.connection.driver_class", "org.postgresql.Driver"); - props.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQL94Dialect"); + props.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect"); props.put("hibernate.connection.url", databaseUrl); props.put("hibernate.connection.username", databaseUsername); props.put("hibernate.connection.password", databasePassword); @@ -136,4 +136,4 @@ public final class EMF { public static String getDriver() { return (String) properties.get("hibernate.connection.driver_class"); } -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index 1994ba03..d430c223 100644 --- a/pom.xml +++ b/pom.xml @@ -35,7 +35,7 @@ 2.0.27 1.70 2.12.2 - 5.6.15.Final + 6.3.1.Final 2.0.4 5.13.0 3.9.4 @@ -327,8 +327,8 @@ - org.hibernate - hibernate-core-jakarta + org.hibernate.orm + hibernate-core ${org.hibernate.hibernate.version}