diff --git a/libraries-testing/pom.xml b/libraries-testing/pom.xml
index 15b454d5c6..2aaad59e09 100644
--- a/libraries-testing/pom.xml
+++ b/libraries-testing/pom.xml
@@ -189,7 +189,7 @@
2.7.0
0.14.1
1.0.0
-
1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/libraries-testing/src/test/java/com/baeldung/dbunit/ConnectionSettings.java b/libraries-testing/src/test/java/com/baeldung/dbunit/ConnectionSettings.java
index cc29d9c58a..0ac5dff496 100644
--- a/libraries-testing/src/test/java/com/baeldung/dbunit/ConnectionSettings.java
+++ b/libraries-testing/src/test/java/com/baeldung/dbunit/ConnectionSettings.java
@@ -2,7 +2,7 @@ package com.baeldung.dbunit;
public class ConnectionSettings {
public static final String JDBC_DRIVER = org.h2.Driver.class.getName();
- public static final String JDBC_URL = "jdbc:h2:mem:default;DB_CLOSE_DELAY=-1;init=runscript from 'classpath:dbunit/schema.sql'";
+ public static final String JDBC_URL = "jdbc:h2:mem:default;MODE=LEGACY;DB_CLOSE_DELAY=-1;init=runscript from 'classpath:dbunit/schema.sql'";
public static final String USER = "sa";
public static final String PASSWORD = "";
}
diff --git a/logging-modules/log4j2/pom.xml b/logging-modules/log4j2/pom.xml
index 02530055e1..7478bf5cdc 100644
--- a/logging-modules/log4j2/pom.xml
+++ b/logging-modules/log4j2/pom.xml
@@ -113,7 +113,7 @@
2.1.1
2.17.1
yyyyMMddHHmmss
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/logging-modules/log4j2/src/test/java/com/baeldung/logging/log4j2/tests/jdbc/ConnectionFactory.java b/logging-modules/log4j2/src/test/java/com/baeldung/logging/log4j2/tests/jdbc/ConnectionFactory.java
index 73b323f335..c084fc44b9 100644
--- a/logging-modules/log4j2/src/test/java/com/baeldung/logging/log4j2/tests/jdbc/ConnectionFactory.java
+++ b/logging-modules/log4j2/src/test/java/com/baeldung/logging/log4j2/tests/jdbc/ConnectionFactory.java
@@ -16,7 +16,7 @@ public class ConnectionFactory {
private ConnectionFactory() {
dataSource = new BasicDataSource();
dataSource.setDriver(new Driver());
- dataSource.setUrl("jdbc:h2:mem:db;DB_CLOSE_DELAY=-1");
+ dataSource.setUrl("jdbc:h2:mem:db;DB_CLOSE_DELAY=-1;NON_KEYWORDS=WHEN");
}
public static Connection getConnection() throws SQLException {
diff --git a/persistence-modules/core-java-persistence-2/pom.xml b/persistence-modules/core-java-persistence-2/pom.xml
index 472484d166..0bec7a808f 100644
--- a/persistence-modules/core-java-persistence-2/pom.xml
+++ b/persistence-modules/core-java-persistence-2/pom.xml
@@ -79,7 +79,7 @@
3.11.11
20220320
07.00.00-MS-GA
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/core-java-persistence-2/src/test/java/com/baeldung/resultset2json/ResultSet2JSONUnitTest.java b/persistence-modules/core-java-persistence-2/src/test/java/com/baeldung/resultset2json/ResultSet2JSONUnitTest.java
index f3dd8350fa..4ca3ca23ef 100644
--- a/persistence-modules/core-java-persistence-2/src/test/java/com/baeldung/resultset2json/ResultSet2JSONUnitTest.java
+++ b/persistence-modules/core-java-persistence-2/src/test/java/com/baeldung/resultset2json/ResultSet2JSONUnitTest.java
@@ -18,7 +18,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class ResultSet2JSONUnitTest {
JSONObject object = new JSONObject(
- "{\"records\":[[\"doe1\",\"7173\",\"John\",\"Doe\"],[\"smith3\",\"3722\",\"Dana\",\"Smith\"],[\"john22\",\"5490\",\"John\",\"Wang\"]],\"fields\":[{\"schema\":\"PUBLIC\",\"name\":\"USERNAME\",\"type\":\"VARCHAR\",\"table\":\"WORDS\"},{\"schema\":\"PUBLIC\",\"name\":\"ID\",\"type\":\"VARCHAR\",\"table\":\"WORDS\"},{\"schema\":\"PUBLIC\",\"name\":\"First name\",\"type\":\"VARCHAR\",\"table\":\"WORDS\"},{\"schema\":\"PUBLIC\",\"name\":\"Last name\",\"type\":\"VARCHAR\",\"table\":\"WORDS\"}]}");
+ "{\"records\":[[\"doe1\",\"7173\",\"John\",\"Doe\"],[\"smith3\",\"3722\",\"Dana\",\"Smith\"],[\"john22\",\"5490\",\"John\",\"Wang\"]],\"fields\":[{\"schema\":\"PUBLIC\",\"name\":\"USERNAME\",\"type\":\"OTHER\",\"table\":\"WORDS\"},{\"schema\":\"PUBLIC\",\"name\":\"ID\",\"type\":\"OTHER\",\"table\":\"WORDS\"},{\"schema\":\"PUBLIC\",\"name\":\"First name\",\"type\":\"OTHER\",\"table\":\"WORDS\"},{\"schema\":\"PUBLIC\",\"name\":\"Last name\",\"type\":\"OTHER\",\"table\":\"WORDS\"}]}");
JSONArray array = new JSONArray(
"[{\"USERNAME\":\"doe1\",\"First name\":\"John\",\"ID\":\"7173\",\"Last name\":\"Doe\"},{\"USERNAME\":\"smith3\",\"First name\":\"Dana\",\"ID\":\"3722\",\"Last name\":\"Smith\"},{\"USERNAME\":\"john22\",\"First name\":\"John\",\"ID\":\"5490\",\"Last name\":\"Wang\"}]");
@@ -43,7 +43,7 @@ public class ResultSet2JSONUnitTest {
@Test
void whenResultSetConvertedUsingJOOQDefaultApproach_shouldMatchJSON() throws SQLException, ClassNotFoundException {
Class.forName("org.h2.Driver");
- Connection dbConnection = DriverManager.getConnection("jdbc:h2:mem:rs2jdbc2", "user", "password");
+ Connection dbConnection = DriverManager.getConnection("jdbc:h2:mem:rs2jdbc2;MODE=LEGACY", "user", "password");
// Create a table
Statement stmt = dbConnection.createStatement();
stmt.execute("CREATE TABLE words AS SELECT * FROM CSVREAD('./example.csv')");
diff --git a/persistence-modules/deltaspike/pom.xml b/persistence-modules/deltaspike/pom.xml
index 5c905b996c..974a61d618 100644
--- a/persistence-modules/deltaspike/pom.xml
+++ b/persistence-modules/deltaspike/pom.xml
@@ -293,7 +293,7 @@
2.6
1.1.3
1.2.4.Final
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/deltaspike/src/test/resources/META-INF/persistence.xml b/persistence-modules/deltaspike/src/test/resources/META-INF/persistence.xml
index ee69855138..ffcf20878c 100644
--- a/persistence-modules/deltaspike/src/test/resources/META-INF/persistence.xml
+++ b/persistence-modules/deltaspike/src/test/resources/META-INF/persistence.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/persistence-modules/hibernate-exceptions/pom.xml b/persistence-modules/hibernate-exceptions/pom.xml
index efa18e1b72..4bef688715 100644
--- a/persistence-modules/hibernate-exceptions/pom.xml
+++ b/persistence-modules/hibernate-exceptions/pom.xml
@@ -39,7 +39,7 @@
2.4.0
2.3.0
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/hibernate-exceptions/src/main/resources/META-INF/persistence.xml b/persistence-modules/hibernate-exceptions/src/main/resources/META-INF/persistence.xml
index 4e83a57f48..a154b41eb5 100644
--- a/persistence-modules/hibernate-exceptions/src/main/resources/META-INF/persistence.xml
+++ b/persistence-modules/hibernate-exceptions/src/main/resources/META-INF/persistence.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/persistence-modules/hibernate-mapping-2/pom.xml b/persistence-modules/hibernate-mapping-2/pom.xml
index 5ecb9e8b73..2a787a0e46 100644
--- a/persistence-modules/hibernate-mapping-2/pom.xml
+++ b/persistence-modules/hibernate-mapping-2/pom.xml
@@ -81,7 +81,7 @@
9.0.0.M26
2.3.0.1
2.3.1
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/hibernate-mapping-2/src/main/resources/persistence-h2.properties b/persistence-modules/hibernate-mapping-2/src/main/resources/persistence-h2.properties
index 9c8cf6e02b..33badc9b62 100644
--- a/persistence-modules/hibernate-mapping-2/src/main/resources/persistence-h2.properties
+++ b/persistence-modules/hibernate-mapping-2/src/main/resources/persistence-h2.properties
@@ -1,6 +1,6 @@
# jdbc.X
jdbc.driverClassName=org.h2.Driver
-jdbc.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
+jdbc.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1;MODE=LEGACY
jdbc.eventGeneratedId=sa
jdbc.user=sa
jdbc.pass=
diff --git a/persistence-modules/hibernate-mapping-2/src/test/resources/manytomany.cfg.xml b/persistence-modules/hibernate-mapping-2/src/test/resources/manytomany.cfg.xml
index 3ddff9a993..db7bc6ab8e 100644
--- a/persistence-modules/hibernate-mapping-2/src/test/resources/manytomany.cfg.xml
+++ b/persistence-modules/hibernate-mapping-2/src/test/resources/manytomany.cfg.xml
@@ -6,7 +6,7 @@
org.h2.Driver
- jdbc:h2:mem:spring_hibernate_many_to_many
+ jdbc:h2:mem:spring_hibernate_many_to_many;MODE=LEGACY
sa
org.hibernate.dialect.H2Dialect
thread
diff --git a/persistence-modules/hibernate-queries/pom.xml b/persistence-modules/hibernate-queries/pom.xml
index a2949e1513..e530ea2555 100644
--- a/persistence-modules/hibernate-queries/pom.xml
+++ b/persistence-modules/hibernate-queries/pom.xml
@@ -87,7 +87,7 @@
9.0.0.M26
6.0.6
2.2.3
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/hibernate-queries/src/main/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExample.java b/persistence-modules/hibernate-queries/src/main/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExample.java
index 69aaaae19d..4cbb6f40de 100644
--- a/persistence-modules/hibernate-queries/src/main/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExample.java
+++ b/persistence-modules/hibernate-queries/src/main/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExample.java
@@ -39,8 +39,8 @@ public class HibernateScalarExample {
.list();
}
- public Integer fetchAvgAgeWithScalar() {
- return (Integer) session.createNativeQuery("SELECT AVG(age) as avgAge FROM Student student")
+ public Double fetchAvgAgeWithScalar() {
+ return (Double) session.createNativeQuery("SELECT AVG(age) as avgAge FROM Student student")
.addScalar("avgAge")
.uniqueResult();
}
diff --git a/persistence-modules/hibernate-queries/src/test/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExampleUnitTest.java b/persistence-modules/hibernate-queries/src/test/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExampleUnitTest.java
index ca01c5cb84..1752c11712 100644
--- a/persistence-modules/hibernate-queries/src/test/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExampleUnitTest.java
+++ b/persistence-modules/hibernate-queries/src/test/java/com/baeldung/hibernate/scalarmethod/HibernateScalarExampleUnitTest.java
@@ -73,7 +73,7 @@ public class HibernateScalarExampleUnitTest {
@Test
public void whenScalarUsedForAvgAge_ThenSingleValueReturned() {
- Integer avgAge = scalarExample.fetchAvgAgeWithScalar();
+ Double avgAge = scalarExample.fetchAvgAgeWithScalar();
assertEquals(true, (avgAge >= 5 && avgAge <= 24));
}
diff --git a/persistence-modules/hibernate-queries/src/test/resources/criteria.cfg.xml b/persistence-modules/hibernate-queries/src/test/resources/criteria.cfg.xml
index 30d8168c5c..d46213ebc6 100644
--- a/persistence-modules/hibernate-queries/src/test/resources/criteria.cfg.xml
+++ b/persistence-modules/hibernate-queries/src/test/resources/criteria.cfg.xml
@@ -6,7 +6,7 @@
org.h2.Driver
- jdbc:h2:mem:testdb
+ jdbc:h2:mem:testdb;MODE=LEGACY
sa
org.hibernate.dialect.H2Dialect
diff --git a/persistence-modules/hibernate-queries/src/test/resources/hibernate-namedquery.properties b/persistence-modules/hibernate-queries/src/test/resources/hibernate-namedquery.properties
index 120212070a..4fc32325da 100644
--- a/persistence-modules/hibernate-queries/src/test/resources/hibernate-namedquery.properties
+++ b/persistence-modules/hibernate-queries/src/test/resources/hibernate-namedquery.properties
@@ -1,5 +1,5 @@
hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:mem:mydb1;DB_CLOSE_DELAY=-1;INIT=RUNSCRIPT FROM 'src/main/resources/init_database.sql'
+hibernate.connection.url=jdbc:h2:mem:mydb1;MODE=LEGACY;DB_CLOSE_DELAY=-1;INIT=RUNSCRIPT FROM 'src/main/resources/init_database.sql'
hibernate.connection.username=sa
hibernate.connection.autocommit=true
jdbc.password=
diff --git a/persistence-modules/hibernate-queries/src/test/resources/hibernate.properties b/persistence-modules/hibernate-queries/src/test/resources/hibernate.properties
index c202f59f82..2d1b8dcb5d 100644
--- a/persistence-modules/hibernate-queries/src/test/resources/hibernate.properties
+++ b/persistence-modules/hibernate-queries/src/test/resources/hibernate.properties
@@ -1,5 +1,5 @@
hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:mem:mydb1;DB_CLOSE_DELAY=-1
+hibernate.connection.url=jdbc:h2:mem:mydb1;MODE=LEGACY;DB_CLOSE_DELAY=-1
hibernate.connection.username=sa
hibernate.connection.autocommit=true
jdbc.password=
diff --git a/persistence-modules/hibernate5/pom.xml b/persistence-modules/hibernate5/pom.xml
index 8f5ab01f77..1a2c65c6ba 100644
--- a/persistence-modules/hibernate5/pom.xml
+++ b/persistence-modules/hibernate5/pom.xml
@@ -57,10 +57,10 @@
- 5.4.12.Final
+ 5.4.24.Final
6.0.6
2.2.3
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/hibernate5/src/test/resources/hibernate-lifecycle.properties b/persistence-modules/hibernate5/src/test/resources/hibernate-lifecycle.properties
index 1a5e6482bf..a1014d77ef 100644
--- a/persistence-modules/hibernate5/src/test/resources/hibernate-lifecycle.properties
+++ b/persistence-modules/hibernate5/src/test/resources/hibernate-lifecycle.properties
@@ -1,5 +1,5 @@
hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:mem:lifecycledb;DB_CLOSE_DELAY=-1;
+hibernate.connection.url=jdbc:h2:mem:lifecycledb;MODE=LEGACY;DB_CLOSE_DELAY=-1;
hibernate.connection.username=sa
hibernate.connection.password=
hibernate.connection.autocommit=true
diff --git a/persistence-modules/hibernate5/src/test/resources/hibernate-namingstrategy.properties b/persistence-modules/hibernate5/src/test/resources/hibernate-namingstrategy.properties
index d0e068d13f..07922ae050 100644
--- a/persistence-modules/hibernate5/src/test/resources/hibernate-namingstrategy.properties
+++ b/persistence-modules/hibernate5/src/test/resources/hibernate-namingstrategy.properties
@@ -1,5 +1,5 @@
hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:mem:mydb1;DB_CLOSE_DELAY=-1
+hibernate.connection.url=jdbc:h2:mem:mydb1;MODE=LEGACY;DB_CLOSE_DELAY=-1
hibernate.connection.username=sa
hibernate.dialect=org.hibernate.dialect.H2Dialect
diff --git a/persistence-modules/java-jpa-3/pom.xml b/persistence-modules/java-jpa-3/pom.xml
index b9516281de..20143af9f0 100644
--- a/persistence-modules/java-jpa-3/pom.xml
+++ b/persistence-modules/java-jpa-3/pom.xml
@@ -91,7 +91,7 @@
3.5.1
3.3.3
3.0.0
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/java-jpa-3/src/main/java/com/baeldung/ignorable/fields/HibernateConfig.java b/persistence-modules/java-jpa-3/src/main/java/com/baeldung/ignorable/fields/HibernateConfig.java
index d121c81c6b..79a5982140 100644
--- a/persistence-modules/java-jpa-3/src/main/java/com/baeldung/ignorable/fields/HibernateConfig.java
+++ b/persistence-modules/java-jpa-3/src/main/java/com/baeldung/ignorable/fields/HibernateConfig.java
@@ -18,7 +18,7 @@ public class HibernateConfig {
Properties settings = new Properties();
settings.put(Environment.DRIVER, "org.h2.Driver");
- settings.put(Environment.URL, "jdbc:h2:mem:test");
+ settings.put(Environment.URL, "jdbc:h2:mem:test;MODE=LEGACY");
settings.put(Environment.USER, "sa");
settings.put(Environment.PASS, "");
settings.put(Environment.DIALECT, "org.hibernate.dialect.H2Dialect");
diff --git a/persistence-modules/java-jpa-3/src/test/resources/META-INF/persistence.xml b/persistence-modules/java-jpa-3/src/test/resources/META-INF/persistence.xml
index 9a33f912bf..bc52256d68 100644
--- a/persistence-modules/java-jpa-3/src/test/resources/META-INF/persistence.xml
+++ b/persistence-modules/java-jpa-3/src/test/resources/META-INF/persistence.xml
@@ -67,7 +67,7 @@
true
-
+
@@ -104,7 +104,7 @@
true
-
+
@@ -138,7 +138,7 @@
true
-
+
diff --git a/persistence-modules/java-jpa/pom.xml b/persistence-modules/java-jpa/pom.xml
index acdd648e45..0c8cec2116 100644
--- a/persistence-modules/java-jpa/pom.xml
+++ b/persistence-modules/java-jpa/pom.xml
@@ -107,7 +107,7 @@
2.2
3.3.3
3.0.0
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml b/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml
index b780a6f569..50188391af 100644
--- a/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml
+++ b/persistence-modules/java-jpa/src/main/resources/META-INF/persistence.xml
@@ -15,7 +15,7 @@
+ value="jdbc:h2:mem:test;MODE=LEGACY;INIT=RUNSCRIPT FROM 'classpath:database.sql'" />
+ value="jdbc:h2:mem:test;MODE=LEGACY" />
+ value="jdbc:h2:mem:entitygraphdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;NON_KEYWORDS=USER" />
2.6.1
5.3.13
5.8.2
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/read-only-transactions/src/main/java/com/baeldung/readonlytransactions/h2/Config.java b/persistence-modules/read-only-transactions/src/main/java/com/baeldung/readonlytransactions/h2/Config.java
index 241dad417b..2e661a9651 100644
--- a/persistence-modules/read-only-transactions/src/main/java/com/baeldung/readonlytransactions/h2/Config.java
+++ b/persistence-modules/read-only-transactions/src/main/java/com/baeldung/readonlytransactions/h2/Config.java
@@ -20,7 +20,7 @@ public class Config {
@Bean("h2DataSource")
public DataSource dataSource() {
HikariConfig config = new HikariConfig();
- config.setJdbcUrl("jdbc:h2:mem:mydb");
+ config.setJdbcUrl("jdbc:h2:mem:mydb;MODE=LEGACY");
config.setUsername("sa");
config.setPassword("");
config.setDriverClassName("org.h2.Driver");
diff --git a/persistence-modules/spring-data-eclipselink/pom.xml b/persistence-modules/spring-data-eclipselink/pom.xml
index 561d144fe3..c3c530d2d7 100644
--- a/persistence-modules/spring-data-eclipselink/pom.xml
+++ b/persistence-modules/spring-data-eclipselink/pom.xml
@@ -66,7 +66,7 @@
1.5.9.RELEASE
2.7.0
- 1.4.197
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/spring-data-eclipselink/src/main/resources/application.properties b/persistence-modules/spring-data-eclipselink/src/main/resources/application.properties
index 5874482e7a..c3ad7011aa 100644
--- a/persistence-modules/spring-data-eclipselink/src/main/resources/application.properties
+++ b/persistence-modules/spring-data-eclipselink/src/main/resources/application.properties
@@ -1,2 +1,2 @@
-spring.datasource.url=jdbc:h2:mem:test;MVCC=FALSE;LOCK_TIMEOUT=100;
+spring.datasource.url=jdbc:h2:mem:test;LOCK_TIMEOUT=100;
spring.jpa.show-sql=true
\ No newline at end of file
diff --git a/persistence-modules/spring-jpa-2/pom.xml b/persistence-modules/spring-jpa-2/pom.xml
index d0152288d4..19bc9cba14 100644
--- a/persistence-modules/spring-jpa-2/pom.xml
+++ b/persistence-modules/spring-jpa-2/pom.xml
@@ -105,7 +105,7 @@
2.2.6.RELEASE
9.0.0.M26
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/spring-jpa-2/src/test/resources/manytomany/db.sql b/persistence-modules/spring-jpa-2/src/test/resources/manytomany/db.sql
index 02905e41ee..fb544b93c6 100644
--- a/persistence-modules/spring-jpa-2/src/test/resources/manytomany/db.sql
+++ b/persistence-modules/spring-jpa-2/src/test/resources/manytomany/db.sql
@@ -1,18 +1,18 @@
CREATE TABLE course (
- id bigint(20) NOT NULL,
+ id bigint auto_increment NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE student (
- id bigint(20) NOT NULL,
+ id bigint auto_increment NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE course_like (
- student_id bigint(20) NOT NULL,
- course_id bigint(20) NOT NULL,
+ student_id bigint auto_increment NOT NULL,
+ course_id bigint auto_increment NOT NULL,
PRIMARY KEY (student_id, course_id),
CONSTRAINT fk_course_like__student FOREIGN KEY (student_id) REFERENCES student (id),
CONSTRAINT fk_course_like__course FOREIGN KEY (course_id) REFERENCES course (id)
@@ -21,9 +21,9 @@ CREATE TABLE course_like (
CREATE TABLE course_rating (
- course_id bigint(20) NOT NULL,
- student_id bigint(20) NOT NULL,
- rating int(11) NOT NULL,
+ course_id bigint auto_increment NOT NULL,
+ student_id bigint auto_increment NOT NULL,
+ rating int auto_increment NOT NULL,
PRIMARY KEY (course_id, student_id),
CONSTRAINT fk_course_rating__student FOREIGN KEY (student_id) REFERENCES student (id),
CONSTRAINT fk_course_rating__course FOREIGN KEY (course_id) REFERENCES course (id)
@@ -32,11 +32,11 @@ CREATE TABLE course_rating (
CREATE TABLE course_registration (
- id bigint(20) NOT NULL,
- grade int(11),
+ id bigint auto_increment NOT NULL,
+ grade int auto_increment,
registered_at datetime NOT NULL,
- course_id bigint(20) NOT NULL,
- student_id bigint(20) NOT NULL,
+ course_id bigint auto_increment NOT NULL,
+ student_id bigint auto_increment NOT NULL,
PRIMARY KEY (id),
CONSTRAINT fk_course_registration__student FOREIGN KEY (student_id) REFERENCES student (id),
CONSTRAINT fk_course_registration__course FOREIGN KEY (course_id) REFERENCES course (id)
diff --git a/persistence-modules/spring-jpa/pom.xml b/persistence-modules/spring-jpa/pom.xml
index a08e3f92c8..77074e835a 100644
--- a/persistence-modules/spring-jpa/pom.xml
+++ b/persistence-modules/spring-jpa/pom.xml
@@ -125,7 +125,7 @@
6.0.15.Final
1.4.01
2.2.5
- 1.4.200
+ 2.1.214
\ No newline at end of file
diff --git a/persistence-modules/spring-jpa/src/test/resources/persistence-student.properties b/persistence-modules/spring-jpa/src/test/resources/persistence-student.properties
index 9ca389d6ab..24e625d418 100644
--- a/persistence-modules/spring-jpa/src/test/resources/persistence-student.properties
+++ b/persistence-modules/spring-jpa/src/test/resources/persistence-student.properties
@@ -1,5 +1,5 @@
jdbc.driverClassName=org.h2.Driver
-jdbc.url=jdbc:h2:mem:myDb;DB_CLOSE_DELAY=-1
+jdbc.url=jdbc:h2:mem:myDb;DB_CLOSE_DELAY=-1;NON_KEYWORDS=KEY,VALUE
hibernate.dialect=org.hibernate.dialect.H2Dialect
hibernate.show_sql=false