diff --git a/README.md b/README.md index 6b59aaab1..3df5d4033 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,11 @@ Hibernate Reactive has been tested with: - MS SQL Server 2019 - Oracle 21.3 - [Hibernate ORM][] 6.4.0.Final -- [Vert.x Reactive PostgreSQL Client](https://vertx.io/docs/vertx-pg-client/java/) 4.5.0 -- [Vert.x Reactive MySQL Client](https://vertx.io/docs/vertx-mysql-client/java/) 4.5.0 -- [Vert.x Reactive Db2 Client](https://vertx.io/docs/vertx-db2-client/java/) 4.5.0 -- [Vert.x Reactive MS SQL Server Client](https://vertx.io/docs/vertx-mssql-client/java/) 4.5.0 -- [Vert.x Reactive Oracle Client](https://vertx.io/docs/vertx-oracle-client/java/) 4.5.0 +- [Vert.x Reactive PostgreSQL Client](https://vertx.io/docs/vertx-pg-client/java/) 4.5.1 +- [Vert.x Reactive MySQL Client](https://vertx.io/docs/vertx-mysql-client/java/) 4.5.1 +- [Vert.x Reactive Db2 Client](https://vertx.io/docs/vertx-db2-client/java/) 4.5.1 +- [Vert.x Reactive MS SQL Server Client](https://vertx.io/docs/vertx-mssql-client/java/) 4.5.1 +- [Vert.x Reactive Oracle Client](https://vertx.io/docs/vertx-oracle-client/java/) 4.5.1 - [Quarkus][Quarkus] via the Hibernate Reactive extension [PostgreSQL]: https://www.postgresql.org diff --git a/build.gradle b/build.gradle index bd64e2500..1ac93d309 100644 --- a/build.gradle +++ b/build.gradle @@ -83,7 +83,7 @@ ext { // Example: // ./gradlew build -PvertxSqlClientVersion=4.0.0-SNAPSHOT if ( !project.hasProperty( 'vertxSqlClientVersion' ) ) { - vertxSqlClientVersion = '4.5.0' + vertxSqlClientVersion = '4.5.1' } testcontainersVersion = '1.18.3' diff --git a/gradle.properties b/gradle.properties index 45eac1069..e6bc9462c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -47,9 +47,9 @@ org.gradle.java.installations.auto-download=false #skipOrmVersionParsing = true # Override default Vert.x Sql client version -#vertxSqlClientVersion = 4.5.0-SNAPSHOT +#vertxSqlClientVersion = 4.5.1-SNAPSHOT # Override default Vert.x Web client and server versions. For integration tests, both default to vertxSqlClientVersion -#vertxWebVersion = 4.5.0 -#vertxWebtClientVersion = 4.5.0 +#vertxWebVersion = 4.5.1 +#vertxWebtClientVersion = 4.5.1 diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java index a15811f2e..739fb18a0 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/JavaTypesArrayTest.java @@ -19,7 +19,6 @@ import org.hibernate.reactive.BaseReactiveTest; - import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIf; @@ -41,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; @Timeout(value = 10, timeUnit = MINUTES) -@DisabledIf( "isNotSupported" ) +@DisabledIf("isNotSupported") public class JavaTypesArrayTest extends BaseReactiveTest { @Override @@ -80,48 +79,93 @@ public void testStringArrayType(VertxTestContext context) { @Test public void testBooleanArrayType(VertxTestContext context) { Basic basic = new Basic(); - Boolean[] dataArray = {TRUE, FALSE, TRUE}; + Boolean[] dataArray = {TRUE, FALSE, null, TRUE}; basic.booleanArray = dataArray; testField( context, basic, found -> assertArrayEquals( dataArray, found.booleanArray ) ); } + @Test + public void testPrimitiveBooleanArrayType(VertxTestContext context) { + Basic basic = new Basic(); + boolean[] dataArray = {true, false, true}; + basic.primitiveBooleanArray = dataArray; + + testField( context, basic, found -> assertArrayEquals( dataArray, found.primitiveBooleanArray ) ); + } + @Test public void testIntegerArrayType(VertxTestContext context) { Basic basic = new Basic(); - Integer[] dataArray = {1, 2, 3}; + Integer[] dataArray = {null, Integer.MIN_VALUE, 2, Integer.MAX_VALUE}; basic.integerArray = dataArray; testField( context, basic, found -> assertArrayEquals( dataArray, found.integerArray ) ); } + @Test + public void testPrimitiveIntegerArrayType(VertxTestContext context) { + Basic basic = new Basic(); + int[] dataArray = {1, 2, 3}; + basic.primitiveIntegerArray = dataArray; + + testField( context, basic, found -> assertArrayEquals( dataArray, found.primitiveIntegerArray ) ); + } + @Test public void testLongArrayType(VertxTestContext context) { Basic basic = new Basic(); - Long[] dataArray = {Long.MIN_VALUE, Long.MAX_VALUE, 3L}; + Long[] dataArray = {Long.MIN_VALUE, Long.MAX_VALUE, 3L, null}; basic.longArray = dataArray; testField( context, basic, found -> assertArrayEquals( dataArray, found.longArray ) ); } + @Test + public void testPrimitiveLongArrayType(VertxTestContext context) { + Basic basic = new Basic(); + long[] dataArray = {Long.MIN_VALUE, Long.MAX_VALUE, 3L}; + basic.primitiveLongArray = dataArray; + + testField( context, basic, found -> assertArrayEquals( dataArray, found.primitiveLongArray ) ); + } + @Test public void testFloatArrayType(VertxTestContext context) { Basic basic = new Basic(); - Float[] dataArray = {12.562f, 13.562f}; + Float[] dataArray = {12.562f, null, 13.562f}; basic.floatArray = dataArray; testField( context, basic, found -> assertArrayEquals( dataArray, found.floatArray ) ); } + @Test + public void testPrimitiveFloatArrayType(VertxTestContext context) { + Basic basic = new Basic(); + float[] dataArray = {12.562f, 13.562f}; + basic.primitiveFloatArray = dataArray; + + testField( context, basic, found -> assertArrayEquals( dataArray, found.primitiveFloatArray ) ); + } + @Test public void testDoubleArrayType(VertxTestContext context) { Basic basic = new Basic(); - Double[] dataArray = {12.562d, 13.562d}; + Double[] dataArray = {12.562d, null, 13.562d}; basic.doubleArray = dataArray; testField( context, basic, found -> assertArrayEquals( dataArray, found.doubleArray ) ); } + @Test + public void testPrimitiveDoubleArrayType(VertxTestContext context) { + Basic basic = new Basic(); + double[] dataArray = {12.562d, 13.562d}; + basic.primitiveDoubleArray = dataArray; + + testField( context, basic, found -> assertArrayEquals( dataArray, found.primitiveDoubleArray ) ); + } + @Test public void testUUIDArrayType(VertxTestContext context) { Basic basic = new Basic(); @@ -153,6 +197,15 @@ public void testShortArrayType(VertxTestContext context) { testField( context, basic, found -> assertArrayEquals( dataArray, found.shortArray ) ); } + @Test + public void testPrimitiveShortArrayType(VertxTestContext context) { + Basic basic = new Basic(); + short[] dataArray = {500, 32, -1}; + basic.primitiveShortArray = dataArray; + + testField( context, basic, found -> assertArrayEquals( dataArray, found.primitiveShortArray ) ); + } + @Test public void testLocalDateArrayType(VertxTestContext context) { Basic basic = new Basic(); @@ -238,18 +291,26 @@ private static class Basic { Integer id; String[] stringArray; Boolean[] booleanArray; - + boolean[] primitiveBooleanArray; Integer[] integerArray; + int[] primitiveIntegerArray; Long[] longArray; + long[] primitiveLongArray; Float[] floatArray; + float[] primitiveFloatArray; Double[] doubleArray; + double[] primitiveDoubleArray; UUID[] uuidArray; AnEnum[] enumArray; Short[] shortArray; + short[] primitiveShortArray; Date[] dateArray; LocalDate[] localDateArray; LocalTime[] localTimeArray; LocalDateTime[] localDateTimeArray; + + // We have to specify the length for BigDecimal and BigInteger because + // the default column type when creating the schema is too small on some databases @Column(length = 5000) BigInteger[] bigIntegerArray; @Column(length = 5000) diff --git a/tooling/jbang/CockroachDBReactiveTest.java.qute b/tooling/jbang/CockroachDBReactiveTest.java.qute index d42459250..6bd79e507 100755 --- a/tooling/jbang/CockroachDBReactiveTest.java.qute +++ b/tooling/jbang/CockroachDBReactiveTest.java.qute @@ -5,9 +5,9 @@ * Copyright: Red Hat Inc. and Hibernate Authors */ -//DEPS io.vertx:vertx-pg-client:$\{vertx.version:4.5.0} -//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.0} -//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.0.5.Final} +//DEPS io.vertx:vertx-pg-client:$\{vertx.version:4.5.1} +//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.1} +//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.2.0.Final} //DEPS org.assertj:assertj-core:3.24.2 //DEPS junit:junit:4.13.2 //DEPS org.testcontainers:cockroachdb:1.18.3 diff --git a/tooling/jbang/Db2ReactiveTest.java.qute b/tooling/jbang/Db2ReactiveTest.java.qute index 7d6cfcf0e..9aa4723b6 100755 --- a/tooling/jbang/Db2ReactiveTest.java.qute +++ b/tooling/jbang/Db2ReactiveTest.java.qute @@ -5,9 +5,9 @@ * Copyright: Red Hat Inc. and Hibernate Authors */ -//DEPS io.vertx:vertx-db2-client:$\{vertx.version:4.5.0} -//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.0} -//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.0.5.Final} +//DEPS io.vertx:vertx-db2-client:$\{vertx.version:4.5.1} +//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.1} +//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.2.0.Final} //DEPS org.assertj:assertj-core:3.24.2 //DEPS junit:junit:4.13.2 //DEPS org.testcontainers:db2:1.18.3 diff --git a/tooling/jbang/Example.java b/tooling/jbang/Example.java index 0f9831235..680f22c01 100644 --- a/tooling/jbang/Example.java +++ b/tooling/jbang/Example.java @@ -6,10 +6,10 @@ */ //DEPS com.ongres.scram:client:2.1 -//DEPS io.vertx:vertx-pg-client:${vertx.version:4.5.0} -//DEPS io.vertx:vertx-mysql-client:${vertx.version:4.5.0} -//DEPS io.vertx:vertx-db2-client:${vertx.version:4.5.0} -//DEPS org.hibernate.reactive:hibernate-reactive-core:${hibernate-reactive.version:2.0.5.Final} +//DEPS io.vertx:vertx-pg-client:${vertx.version:4.5.1} +//DEPS io.vertx:vertx-mysql-client:${vertx.version:4.5.1} +//DEPS io.vertx:vertx-db2-client:${vertx.version:4.5.1} +//DEPS org.hibernate.reactive:hibernate-reactive-core:${hibernate-reactive.version:2.2.0.Final} //DEPS org.slf4j:slf4j-simple:2.0.7 //DESCRIPTION Allow authentication to PostgreSQL using SCRAM: diff --git a/tooling/jbang/MariaDBReactiveTest.java.qute b/tooling/jbang/MariaDBReactiveTest.java.qute index 2c1537275..23b4675ce 100755 --- a/tooling/jbang/MariaDBReactiveTest.java.qute +++ b/tooling/jbang/MariaDBReactiveTest.java.qute @@ -5,9 +5,9 @@ * Copyright: Red Hat Inc. and Hibernate Authors */ -//DEPS io.vertx:vertx-mysql-client:$\{vertx.version:4.5.0} -//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.0} -//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.0.5.Final} +//DEPS io.vertx:vertx-mysql-client:$\{vertx.version:4.5.1} +//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.1} +//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.2.0.Final} //DEPS org.assertj:assertj-core:3.24.2 //DEPS junit:junit:4.13.2 //DEPS org.testcontainers:mariadb:1.18.3 diff --git a/tooling/jbang/MySQLReactiveTest.java.qute b/tooling/jbang/MySQLReactiveTest.java.qute index 704a39f6d..6adf27020 100755 --- a/tooling/jbang/MySQLReactiveTest.java.qute +++ b/tooling/jbang/MySQLReactiveTest.java.qute @@ -5,9 +5,9 @@ * Copyright: Red Hat Inc. and Hibernate Authors */ -//DEPS io.vertx:vertx-mysql-client:$\{vertx.version:4.5.0} -//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.0} -//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.0.5.Final} +//DEPS io.vertx:vertx-mysql-client:$\{vertx.version:4.5.1} +//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.1} +//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.2.0.Final} //DEPS org.assertj:assertj-core:3.24.2 //DEPS junit:junit:4.13.2 //DEPS org.testcontainers:mysql:1.18.3 diff --git a/tooling/jbang/PostgreSQLReactiveTest.java.qute b/tooling/jbang/PostgreSQLReactiveTest.java.qute index 954a79715..c8c4dbff8 100755 --- a/tooling/jbang/PostgreSQLReactiveTest.java.qute +++ b/tooling/jbang/PostgreSQLReactiveTest.java.qute @@ -5,9 +5,9 @@ * Copyright: Red Hat Inc. and Hibernate Authors */ -//DEPS io.vertx:vertx-pg-client:$\{vertx.version:4.5.0} -//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.0} -//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.0.5.Final} +//DEPS io.vertx:vertx-pg-client:$\{vertx.version:4.5.1} +//DEPS io.vertx:vertx-unit:$\{vertx.version:4.5.1} +//DEPS org.hibernate.reactive:hibernate-reactive-core:$\{hibernate-reactive.version:2.2.0.Final} //DEPS org.assertj:assertj-core:3.24.2 //DEPS junit:junit:4.13.2 //DEPS org.testcontainers:postgresql:1.18.3 diff --git a/tooling/jbang/ReactiveTest.java b/tooling/jbang/ReactiveTest.java index 3253b363f..2cb7177e2 100755 --- a/tooling/jbang/ReactiveTest.java +++ b/tooling/jbang/ReactiveTest.java @@ -5,12 +5,12 @@ */ ///usr/bin/env jbang "$0" "$@" ; exit $? -//DEPS io.vertx:vertx-pg-client:${vertx.version:4.5.0} +//DEPS io.vertx:vertx-pg-client:${vertx.version:4.5.1} //DEPS com.ongres.scram:client:2.1 -//DEPS io.vertx:vertx-db2-client:${vertx.version:4.5.0} -//DEPS io.vertx:vertx-mysql-client:${vertx.version:4.5.0} -//DEPS io.vertx:vertx-unit:${vertx.version:4.5.0} -//DEPS org.hibernate.reactive:hibernate-reactive-core:${hibernate-reactive.version:2.0.5.Final} +//DEPS io.vertx:vertx-db2-client:${vertx.version:4.5.1} +//DEPS io.vertx:vertx-mysql-client:${vertx.version:4.5.1} +//DEPS io.vertx:vertx-unit:${vertx.version:4.5.1} +//DEPS org.hibernate.reactive:hibernate-reactive-core:${hibernate-reactive.version:2.2.0.Final} //DEPS org.assertj:assertj-core:3.24.2 //DEPS junit:junit:4.13.2 //DEPS org.testcontainers:postgresql:1.18.3