mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-09-20 11:17:36 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0683a5637b | ||
|
|
49c2a1f79e |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-net-postgis-types</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-pgvector-types</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -41,7 +41,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -60,13 +60,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
|
||||
@@ -1,39 +1,40 @@
|
||||
# Guide: `@DbJson` / `@DbJsonB` mapping support
|
||||
# Guide: `@DbJson` / `@DbJsonB` mapping support — built-in vs Jackson ObjectMapper
|
||||
|
||||
## Purpose
|
||||
|
||||
Ebean can map `@DbJson` and `@DbJsonB` properties in three ways:
|
||||
Ebean can map `@DbJson` and `@DbJsonB` properties in two ways:
|
||||
|
||||
- **Built-in** JSON support, backed by **avaje-json-core** — no extra dependency.
|
||||
- **Jackson `ObjectMapper`**, provided by **`ebean-jackson-mapper`**.
|
||||
- **Avaje Jsonb**, provided by **`ebean-avajejsonb-mapper`** and its generated adapters.
|
||||
- **Jackson `ObjectMapper`**, provided by the **`ebean-jackson-mapper`** module — used
|
||||
for everything the built-in support does not handle.
|
||||
|
||||
The built-in mapper handles the common natural JSON types. Add one mapper module for
|
||||
typed collections, POJOs, records, and other custom types.
|
||||
This guide lists exactly which property types are handled built-in and which require
|
||||
`ebean-jackson-mapper`.
|
||||
|
||||
> If a property type is **not** handled built-in and no mapper module is on the classpath,
|
||||
> Ebean fails fast at startup:
|
||||
> If a property type is **not** handled built-in and `ebean-jackson-mapper` is not on the
|
||||
> classpath, Ebean fails fast at startup:
|
||||
>
|
||||
> ```text
|
||||
> Unsupported @DbJson mapping - missing JSON mapper dependency for <property>
|
||||
> Unsupported @DbJson mapping - Missing dependency ebean-jackson-mapper?
|
||||
> Jackson ObjectMapper not present for <property>
|
||||
> ```
|
||||
|
||||
---
|
||||
|
||||
## Quick reference
|
||||
|
||||
| Property type | Built-in (avaje-json-core) | Mapper module |
|
||||
|---|:---:|---|
|
||||
| Property type | Built-in (avaje-json-core) | Needs `ebean-jackson-mapper` |
|
||||
|---|:---:|:---:|
|
||||
| `String` | ✅ | |
|
||||
| `List<String>`, `List<Long>` | ✅ | |
|
||||
| `Set<String>`, `Set<Long>` | ✅ | |
|
||||
| `Map<String, Object>`, `Map<String, ?>` | ✅ | |
|
||||
| `Map<String, String>` | ✅ | |
|
||||
| `Map<Enum, Object>`, `Map<Enum, String>` | ✅ | |
|
||||
| `List`/`Set` of any other element type (`Integer`, `Double`, `UUID`, `LocalDate`, an enum, a POJO, …) | | Jackson or Avaje Jsonb |
|
||||
| `Map` with a typed value other than `String`/`Object` (`Map<String,Integer>`, `Map<String,UUID>`, …) | | Jackson or Avaje Jsonb |
|
||||
| `Map` with a key other than `String` or an enum (`Map<Integer, …>`, `Map<UUID, …>`) | | Jackson or Avaje Jsonb |
|
||||
| POJOs, records, or any other type | | Jackson or Avaje Jsonb |
|
||||
| `List`/`Set` of any other element type (`Integer`, `Double`, `UUID`, `LocalDate`, an enum, a POJO, …) | | ✅ |
|
||||
| `Map` with a typed value other than `String`/`Object` (`Map<String,Integer>`, `Map<String,UUID>`, …) | | ✅ |
|
||||
| `Map` with a key other than `String` or an enum (`Map<Integer, …>`, `Map<UUID, …>`) | | ✅ |
|
||||
| POJOs, records, or any other type | | ✅ |
|
||||
|
||||
---
|
||||
|
||||
@@ -58,10 +59,10 @@ Postgres `json` / `jsonb` — without `ebean-jackson-mapper`.
|
||||
|
||||
---
|
||||
|
||||
## Jackson `ObjectMapper`
|
||||
## Everything else → Jackson `ObjectMapper`
|
||||
|
||||
`ebean-jackson-mapper` uses a Jackson `ObjectMapper` for the property types not handled
|
||||
built-in:
|
||||
Any other `@DbJson` / `@DbJsonB` property routes to the Jackson `ObjectMapper` path, which
|
||||
requires `ebean-jackson-mapper`:
|
||||
|
||||
- **Typed collections** — `List`/`Set` whose element type is not `String` or `Long`
|
||||
(for example `List<Integer>`, `List<UUID>`, `List<LocalDate>`, `List<MyEnum>`, `List<MyPojo>`).
|
||||
@@ -76,7 +77,7 @@ built-in:
|
||||
|
||||
---
|
||||
|
||||
### Adding `ebean-jackson-mapper`
|
||||
## Adding `ebean-jackson-mapper`
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
@@ -91,79 +92,6 @@ registers the mapper-based JSON support automatically.
|
||||
|
||||
---
|
||||
|
||||
## Avaje Jsonb
|
||||
|
||||
`ebean-avajejsonb-mapper` uses Avaje Jsonb adapters. Annotate each JSON payload type with
|
||||
`@Json`, or use `@Json.Import`, and configure `avaje-jsonb-generator` as an annotation
|
||||
processor.
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-avajejsonb-mapper</artifactId>
|
||||
<version>${ebean.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
```xml
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-jsonb-generator</artifactId>
|
||||
<version>${avaje-jsonb.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```java
|
||||
import io.avaje.jsonb.Json;
|
||||
|
||||
@Json
|
||||
public class Address {
|
||||
public String line1;
|
||||
public String city;
|
||||
}
|
||||
```
|
||||
|
||||
Avaje Jsonb preserves a property's declared generic type, so `List<Address>` and other
|
||||
parameterised JSON values use the generated `Address` adapter.
|
||||
|
||||
### Avaje JsonNode
|
||||
|
||||
`@DbJson` and `@DbJsonB` properties declared as `io.avaje.json.node.JsonNode` are supported
|
||||
when the application includes `avaje-json-node`. Its Jsonb component supplies the JSON tree
|
||||
adapters; no application-generated adapter is needed for the node hierarchy.
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-json-node</artifactId>
|
||||
<version>${avaje-jsonb.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## Mapper module selection
|
||||
|
||||
Use exactly one mapper module in an application: `ebean-jackson-mapper` or
|
||||
`ebean-avajejsonb-mapper`. Ebean selects a single `ScalarJsonMapper` service provider, so
|
||||
having both modules on the runtime classpath is not supported.
|
||||
|
||||
The `ebean` composite dependency includes `ebean-jackson-mapper`. Applications using Avaje
|
||||
Jsonb should depend on the individual Ebean modules they need instead of that composite.
|
||||
|
||||
To migrate from Jackson to Avaje Jsonb, remove `ebean-jackson-mapper`, add
|
||||
`ebean-avajejsonb-mapper`, and generate adapters for each JSON payload type.
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- **Enum map keys** are serialised using the enum `name()` (for example `ACTIVE`), not any
|
||||
@@ -174,13 +102,15 @@ To migrate from Jackson to Avaje Jsonb, remove `ebean-jackson-mapper`, add
|
||||
(with a JSON fallback on platforms without array support) and supports more element types
|
||||
than built-in `@DbJson` collections.
|
||||
- The reason typed value/element collections need a real mapper is that the built-in path
|
||||
only produces natural JSON types — for example a JSON number always parses to `Long`.
|
||||
only produces natural JSON types — for example a JSON number always parses to `Long`, so a
|
||||
declared `List<Integer>` or `Map<String,Integer>` could not be populated safely without a
|
||||
type-aware mapper.
|
||||
|
||||
---
|
||||
|
||||
## Choosing
|
||||
|
||||
- Prefer the **built-in** mappings for the common cases (`String`, string/long lists and sets,
|
||||
object/string maps) to avoid an additional mapper module.
|
||||
- Add **`ebean-jackson-mapper`** or **`ebean-avajejsonb-mapper`** when you need rich POJO JSON
|
||||
columns or typed collections / typed-value maps.
|
||||
object/string maps) to avoid pulling in Jackson.
|
||||
- Add **`ebean-jackson-mapper`** when you need rich POJO JSON columns or typed collections /
|
||||
typed-value maps.
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
|
||||
@@ -3,6 +3,8 @@ package io.ebean;
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import jakarta.persistence.EntityNotFoundException;
|
||||
import javax.sql.DataSource;
|
||||
import java.io.Serializable;
|
||||
import java.sql.Connection;
|
||||
import java.util.Collection;
|
||||
@@ -10,6 +12,7 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Query object for performing native SQL queries that return SqlRow or directly read
|
||||
@@ -312,7 +315,7 @@ public interface SqlQuery extends Serializable, FindableQuery<SqlQuery, SqlRow>
|
||||
*
|
||||
* @param <T> The type of the scalar values
|
||||
*/
|
||||
interface TypeQuery<T> extends FindableQuery<TypeQuery<T>, T> {
|
||||
interface TypeQuery<T> {
|
||||
|
||||
/**
|
||||
* Ensure the master DataSource is used when useMaster is true. Otherwise, the read only
|
||||
@@ -320,38 +323,43 @@ public interface SqlQuery extends Serializable, FindableQuery<SqlQuery, SqlRow>
|
||||
*
|
||||
* @see SqlQuery#usingMaster(boolean)
|
||||
*/
|
||||
@Override
|
||||
TypeQuery<T> usingMaster(boolean useMaster);
|
||||
|
||||
/**
|
||||
* Execute the query using the given transaction.
|
||||
*/
|
||||
@Override
|
||||
TypeQuery<T> usingTransaction(Transaction transaction);
|
||||
|
||||
/**
|
||||
* Execute the query using the given connection.
|
||||
*/
|
||||
@Override
|
||||
TypeQuery<T> usingConnection(Connection connection);
|
||||
|
||||
/**
|
||||
* Return the single value.
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
T findOne();
|
||||
|
||||
/**
|
||||
* Return the single value that is optional.
|
||||
*/
|
||||
@Override
|
||||
Optional<T> findOneOrEmpty();
|
||||
|
||||
/**
|
||||
* Return the single value or throw a {@link jakarta.persistence.EntityNotFoundException}
|
||||
* if there is no matching row.
|
||||
*/
|
||||
default T findOneOrThrow() {
|
||||
return findOneOrEmpty().orElseThrow(() -> new EntityNotFoundException("Not found"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the single value or throw the exception produced by the given supplier
|
||||
* if there is no matching row.
|
||||
*/
|
||||
default T findOneOrThrow(Supplier<? extends RuntimeException> exceptionSupplier) {
|
||||
return findOneOrEmpty().orElseThrow(exceptionSupplier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of values.
|
||||
*/
|
||||
@Override
|
||||
List<T> findList();
|
||||
|
||||
/**
|
||||
|
||||
@@ -158,15 +158,6 @@ public interface SqlUpdate {
|
||||
*/
|
||||
int executeNow();
|
||||
|
||||
/**
|
||||
* Set an explicit transaction to use to execute this statement.
|
||||
* <p>
|
||||
* When not set, {@link #execute()} and {@link #executeNow()} use whatever transaction
|
||||
* is currently active on the thread (or auto-commit if none is active) - consistent
|
||||
* with {@link Database#execute(SqlUpdate, Transaction)}.
|
||||
*/
|
||||
SqlUpdate usingTransaction(Transaction transaction);
|
||||
|
||||
/**
|
||||
* Execute when addBatch() has been used to batch multiple bind executions.
|
||||
*
|
||||
|
||||
@@ -84,15 +84,6 @@ public interface Update<T> {
|
||||
*/
|
||||
int execute();
|
||||
|
||||
/**
|
||||
* Set an explicit transaction to use to execute this statement.
|
||||
* <p>
|
||||
* When not set, {@link #execute()} uses whatever transaction is currently active on
|
||||
* the thread (or auto-commit if none is active) - consistent with
|
||||
* {@link Database#execute(Update, Transaction)}.
|
||||
*/
|
||||
Update<T> usingTransaction(Transaction transaction);
|
||||
|
||||
/**
|
||||
* Set an ordered bind parameter.
|
||||
* <p>
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ebean-avajejsonb-mapper</artifactId>
|
||||
<name>ebean-avajejsonb-mapper</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-json-core</artifactId>
|
||||
<version>${avaje-json-core.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-jsonb</artifactId>
|
||||
<version>${avaje-jsonb.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-json-node</artifactId>
|
||||
<version>${avaje-jsonb.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2database.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-jsonb-generator</artifactId>
|
||||
<version>${avaje-jsonb.version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-maven-plugin</artifactId>
|
||||
<version>${ebean-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test</id>
|
||||
<phase>process-test-classes</phase>
|
||||
<configuration>
|
||||
<packages>org/example/avajejsonb/**</packages>
|
||||
<transformArgs>debug=0</transformArgs>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>testEnhance</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
-223
@@ -1,223 +0,0 @@
|
||||
package io.ebean.avajejsonb.mapper;
|
||||
|
||||
import io.avaje.json.JsonReader;
|
||||
import io.avaje.json.JsonWriter;
|
||||
import io.avaje.jsonb.JsonType;
|
||||
import io.avaje.jsonb.Jsonb;
|
||||
import io.ebean.annotation.MutationDetection;
|
||||
import io.ebean.core.type.DataBinder;
|
||||
import io.ebean.core.type.DataReader;
|
||||
import io.ebean.core.type.DocPropertyType;
|
||||
import io.ebean.core.type.JsonTrim;
|
||||
import io.ebean.core.type.PostgresHelper;
|
||||
import io.ebean.core.type.ScalarJsonManager;
|
||||
import io.ebean.core.type.ScalarJsonMapper;
|
||||
import io.ebean.core.type.ScalarJsonRequest;
|
||||
import io.ebean.core.type.ScalarType;
|
||||
import io.ebean.core.type.ScalarTypeBase;
|
||||
import io.ebean.text.TextException;
|
||||
import jakarta.persistence.PersistenceException;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Type;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Types;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* Supports {@code @DbJson} properties using Avaje Jsonb.
|
||||
*/
|
||||
public final class ScalarJsonAvajeJsonbMapper implements ScalarJsonMapper {
|
||||
|
||||
private final ConcurrentHashMap<Type, JsonType<Object>> jsonTypes = new ConcurrentHashMap<>();
|
||||
|
||||
@Override
|
||||
public <A extends Annotation> Class<A> markerAnnotation() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScalarType<?> createType(ScalarJsonRequest request) {
|
||||
Type genericType = genericType(request);
|
||||
JsonType<Object> jsonType = jsonTypes.computeIfAbsent(genericType, type -> jsonb(request.manager()).type(type));
|
||||
if (request.mode() == MutationDetection.NONE) {
|
||||
return new NoMutationDetection(request.manager(), jsonType, request.dbType(), request.docType());
|
||||
}
|
||||
return new GenericObject(request.manager(), jsonType, request.dbType(), request.docType());
|
||||
}
|
||||
|
||||
private Jsonb jsonb(ScalarJsonManager manager) {
|
||||
Object mapper = manager.mapper();
|
||||
return mapper instanceof Jsonb ? (Jsonb) mapper : Jsonb.instance();
|
||||
}
|
||||
|
||||
private Type genericType(ScalarJsonRequest request) {
|
||||
Class<?> type = request.beanType();
|
||||
while (type != null) {
|
||||
try {
|
||||
Field field = type.getDeclaredField(request.name());
|
||||
return field.getGenericType();
|
||||
} catch (NoSuchFieldException e) {
|
||||
type = type.getSuperclass();
|
||||
}
|
||||
}
|
||||
throw new IllegalStateException("Field not found to match " + request.name());
|
||||
}
|
||||
|
||||
private static final class NoMutationDetection extends Base<Object> {
|
||||
|
||||
NoMutationDetection(ScalarJsonManager jsonManager, JsonType<Object> jsonType, int dbType, DocPropertyType docType) {
|
||||
super(Object.class, jsonManager, jsonType, dbType, docType);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class GenericObject extends Base<Object> {
|
||||
|
||||
private final boolean jsonb;
|
||||
|
||||
GenericObject(ScalarJsonManager jsonManager, JsonType<Object> jsonType, int dbType, DocPropertyType docType) {
|
||||
super(Object.class, jsonManager, jsonType, dbType, docType);
|
||||
this.jsonb = "jsonb".equals(pgType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mutable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean jsonMapper() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object read(DataReader reader) throws SQLException {
|
||||
String json = reader.getString();
|
||||
if (jsonb) {
|
||||
json = JsonTrim.trim(json);
|
||||
}
|
||||
reader.pushJson(json);
|
||||
return parseJson(json);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bind(DataBinder binder, Object value) throws SQLException {
|
||||
String rawJson = binder.popJson();
|
||||
if (rawJson == null && value != null) {
|
||||
rawJson = formatValue(value);
|
||||
}
|
||||
bindJson(binder, value, rawJson);
|
||||
}
|
||||
}
|
||||
|
||||
private static abstract class Base<T> extends ScalarTypeBase<T> {
|
||||
|
||||
private final JsonType<T> jsonType;
|
||||
protected final String pgType;
|
||||
private final DocPropertyType docType;
|
||||
|
||||
Base(Class<T> cls, ScalarJsonManager jsonManager, JsonType<T> jsonType, int dbType, DocPropertyType docType) {
|
||||
super(cls, false, dbType);
|
||||
this.jsonType = jsonType;
|
||||
this.pgType = jsonManager.postgresType(dbType);
|
||||
this.docType = docType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T read(DataReader reader) throws SQLException {
|
||||
return parseJson(reader.getString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bind(DataBinder binder, T value) throws SQLException {
|
||||
bindJson(binder, value, value == null ? null : formatValue(value));
|
||||
}
|
||||
|
||||
final T parseJson(String json) {
|
||||
if (json == null || json.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return jsonType.fromJson(json);
|
||||
} catch (RuntimeException e) {
|
||||
throw new TextException("Failed to parse JSON [{}] as " + jsonType, json, e);
|
||||
}
|
||||
}
|
||||
|
||||
final void bindJson(DataBinder binder, Object value, String rawJson) throws SQLException {
|
||||
if (pgType != null) {
|
||||
binder.setObject(PostgresHelper.asObject(pgType, rawJson));
|
||||
} else if (value == null) {
|
||||
binder.setNull(Types.VARCHAR);
|
||||
} else {
|
||||
binder.setString(rawJson);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Object toJdbcType(Object value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public final T toBeanType(Object value) {
|
||||
return (T) value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String formatValue(T value) {
|
||||
try {
|
||||
return jsonType.toJson(value);
|
||||
} catch (RuntimeException e) {
|
||||
throw new PersistenceException("Unable to create JSON", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final T parse(String value) {
|
||||
return parseJson(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DocPropertyType docType() {
|
||||
return docType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final T jsonRead(JsonReader parser) {
|
||||
if (parser.isNullValue()) {
|
||||
return null;
|
||||
}
|
||||
return parseJson(parser.readRaw());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void jsonWrite(JsonWriter writer, T value) throws IOException {
|
||||
if (value == null) {
|
||||
writer.nullValue();
|
||||
} else {
|
||||
writer.rawValue(formatValue(value));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final T readData(DataInput dataInput) throws IOException {
|
||||
return dataInput.readBoolean() ? parse(dataInput.readUTF()) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void writeData(DataOutput dataOutput, T value) throws IOException {
|
||||
if (value == null) {
|
||||
dataOutput.writeBoolean(false);
|
||||
} else {
|
||||
dataOutput.writeBoolean(true);
|
||||
dataOutput.writeUTF(format(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import io.ebean.avajejsonb.mapper.ScalarJsonAvajeJsonbMapper;
|
||||
|
||||
module io.ebean.avajejsonb.mapper {
|
||||
|
||||
requires io.avaje.jsonb;
|
||||
requires io.ebean.core.type;
|
||||
|
||||
provides io.ebean.core.type.ScalarJsonMapper with ScalarJsonAvajeJsonbMapper;
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
io.ebean.avajejsonb.mapper.ScalarJsonAvajeJsonbMapper
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
package io.ebean.avajejsonb.mapper;
|
||||
|
||||
import io.avaje.json.node.JsonNode;
|
||||
import io.avaje.json.node.JsonObject;
|
||||
import io.ebean.Database;
|
||||
import io.ebean.DatabaseBuilder;
|
||||
import org.example.avajejsonb.JsonbEntity;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class JsonbDatabaseTest {
|
||||
|
||||
@Test
|
||||
void dbJson_roundTripsJsonbPayloadsAndJsonNode() {
|
||||
Database database = buildDatabase();
|
||||
try {
|
||||
JsonbEntity entity = new JsonbEntity();
|
||||
entity.setPayload(new JsonbPayload("main", 1));
|
||||
entity.setPayloads(List.of(new JsonbPayload("first", 2), new JsonbPayload("second", 3)));
|
||||
entity.setNode(JsonObject.create().add("name", "node").add("count", 4));
|
||||
database.save(entity);
|
||||
|
||||
JsonbEntity found = database.find(JsonbEntity.class, entity.getId());
|
||||
|
||||
assertThat(found.getPayload()).isEqualTo(new JsonbPayload("main", 1));
|
||||
assertThat(found.getPayloads()).containsExactly(new JsonbPayload("first", 2), new JsonbPayload("second", 3));
|
||||
JsonNode node = found.getNode();
|
||||
assertThat(node.extract("name")).isEqualTo("node");
|
||||
assertThat(node.extract("count", 0)).isEqualTo(4);
|
||||
} finally {
|
||||
database.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
private static Database buildDatabase() {
|
||||
DatabaseBuilder config = Database.builder();
|
||||
config.setName("avajeJsonbMapper");
|
||||
config.setDefaultServer(false);
|
||||
config.setDdlGenerate(true);
|
||||
config.setDdlRun(true);
|
||||
config.setDdlExtra(false);
|
||||
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("datasource.avajeJsonbMapper.username", "sa");
|
||||
properties.setProperty("datasource.avajeJsonbMapper.password", "");
|
||||
properties.setProperty("datasource.avajeJsonbMapper.databaseUrl", "jdbc:h2:mem:avajeJsonbMapper");
|
||||
properties.setProperty("datasource.avajeJsonbMapper.databaseDriver", "org.h2.Driver");
|
||||
config.loadFromProperties(properties);
|
||||
config.addClass(JsonbEntity.class);
|
||||
return config.build();
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package io.ebean.avajejsonb.mapper;
|
||||
|
||||
import io.avaje.jsonb.Json;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Json
|
||||
public class JsonbPayload {
|
||||
|
||||
public String name;
|
||||
public int count;
|
||||
|
||||
public JsonbPayload() {
|
||||
}
|
||||
|
||||
JsonbPayload(String name, int count) {
|
||||
this.name = name;
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (this == object) {
|
||||
return true;
|
||||
}
|
||||
if (!(object instanceof JsonbPayload)) {
|
||||
return false;
|
||||
}
|
||||
JsonbPayload other = (JsonbPayload) object;
|
||||
return count == other.count && Objects.equals(name, other.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, count);
|
||||
}
|
||||
}
|
||||
-130
@@ -1,130 +0,0 @@
|
||||
package io.ebean.avajejsonb.mapper;
|
||||
|
||||
import io.avaje.json.node.JsonNode;
|
||||
import io.avaje.json.node.JsonObject;
|
||||
import io.avaje.jsonb.Json;
|
||||
import io.ebean.annotation.MutationDetection;
|
||||
import io.ebean.core.type.DocPropertyType;
|
||||
import io.ebean.core.type.ScalarJsonManager;
|
||||
import io.ebean.core.type.ScalarJsonRequest;
|
||||
import io.ebean.core.type.ScalarType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.sql.Types;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class ScalarJsonAvajeJsonbMapperTest {
|
||||
|
||||
private static final ScalarJsonManager JSON_MANAGER = new ScalarJsonManager() {
|
||||
|
||||
@Override
|
||||
public MutationDetection mutationDetection() {
|
||||
return MutationDetection.HASH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object mapper() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String postgresType(int dbType) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
private final ScalarJsonAvajeJsonbMapper mapper = new ScalarJsonAvajeJsonbMapper();
|
||||
|
||||
@Test
|
||||
void pojo_roundTripsThroughGeneratedJsonbAdapter() {
|
||||
ScalarType<Object> scalarType = scalarType("document", MutationDetection.HASH);
|
||||
Payload payload = new Payload("hello", 42);
|
||||
|
||||
String json = scalarType.formatValue(payload);
|
||||
|
||||
assertThat(json).isEqualTo("{\"name\":\"hello\",\"count\":42}");
|
||||
assertThat(scalarType.parse(json)).isEqualTo(payload);
|
||||
assertThat(scalarType.mutable()).isTrue();
|
||||
assertThat(scalarType.jsonMapper()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void genericList_roundTripsUsingPropertyGenericType() {
|
||||
ScalarType<Object> scalarType = scalarType("payloads", MutationDetection.HASH);
|
||||
List<Payload> payloads = List.of(new Payload("one", 1), new Payload("two", 2));
|
||||
|
||||
String json = scalarType.formatValue(payloads);
|
||||
|
||||
assertThat(json).isEqualTo("[{\"name\":\"one\",\"count\":1},{\"name\":\"two\",\"count\":2}]");
|
||||
assertThat(scalarType.parse(json)).isEqualTo(payloads);
|
||||
}
|
||||
|
||||
@Test
|
||||
void jsonNode_roundTripsThroughAvajeJsonNodeComponent() {
|
||||
ScalarType<Object> scalarType = scalarType("node", MutationDetection.HASH);
|
||||
JsonNode node = JsonObject.create().add("name", "node").add("count", 3);
|
||||
|
||||
String json = scalarType.formatValue(node);
|
||||
|
||||
assertThat(json).isEqualTo("{\"name\":\"node\",\"count\":3}");
|
||||
JsonNode parsed = (JsonNode) scalarType.parse(json);
|
||||
assertThat(parsed.extract("name")).isEqualTo("node");
|
||||
assertThat(parsed.extract("count", 0)).isEqualTo(3);
|
||||
}
|
||||
|
||||
@Test
|
||||
void mutationDetectionNone_isNotMutable() {
|
||||
ScalarType<Object> scalarType = scalarType("document", MutationDetection.NONE);
|
||||
|
||||
assertThat(scalarType.mutable()).isFalse();
|
||||
assertThat(scalarType.jsonMapper()).isFalse();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private ScalarType<Object> scalarType(String property, MutationDetection mutationDetection) {
|
||||
var request = new ScalarJsonRequest(JSON_MANAGER, Types.VARCHAR, DocPropertyType.OBJECT, Entity.class, mutationDetection, property);
|
||||
return (ScalarType<Object>) mapper.createType(request);
|
||||
}
|
||||
|
||||
private static final class Entity {
|
||||
|
||||
Payload document;
|
||||
List<Payload> payloads;
|
||||
JsonNode node;
|
||||
}
|
||||
|
||||
@Json
|
||||
static class Payload {
|
||||
|
||||
public String name;
|
||||
public int count;
|
||||
|
||||
Payload() {
|
||||
}
|
||||
|
||||
Payload(String name, int count) {
|
||||
this.name = name;
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (this == object) {
|
||||
return true;
|
||||
}
|
||||
if (!(object instanceof Payload)) {
|
||||
return false;
|
||||
}
|
||||
Payload other = (Payload) object;
|
||||
return count == other.count && Objects.equals(name, other.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package org.example.avajejsonb;
|
||||
|
||||
import io.avaje.json.node.JsonNode;
|
||||
import io.ebean.avajejsonb.mapper.JsonbPayload;
|
||||
import io.ebean.annotation.DbJson;
|
||||
import io.ebean.annotation.DbJsonB;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
public class JsonbEntity {
|
||||
|
||||
@Id
|
||||
long id;
|
||||
|
||||
@DbJson
|
||||
JsonbPayload payload;
|
||||
|
||||
@DbJson
|
||||
List<JsonbPayload> payloads;
|
||||
|
||||
@DbJsonB
|
||||
JsonNode node;
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public JsonbPayload getPayload() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
public void setPayload(JsonbPayload payload) {
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public List<JsonbPayload> getPayloads() {
|
||||
return payloads;
|
||||
}
|
||||
|
||||
public void setPayloads(List<JsonbPayload> payloads) {
|
||||
this.payloads = payloads;
|
||||
}
|
||||
|
||||
public JsonNode getNode() {
|
||||
return node;
|
||||
}
|
||||
|
||||
public void setNode(JsonNode node) {
|
||||
this.node = node;
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
entity-packages: org.example.avajejsonb
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-bench</artifactId>
|
||||
|
||||
+28
-34
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -89,25 +89,25 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -125,19 +125,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>18.4.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-avajejsonb-mapper</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -161,37 +155,37 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- platforms -->
|
||||
@@ -199,91 +193,91 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-clickhouse</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-db2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-hana</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mariadb</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mysql</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-nuodb</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-oracle</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-pgvector</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-pgvector-types</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlite</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlserver</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
<artifactId>ebean-core-json</artifactId>
|
||||
<name>ebean-core-json</name>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.7.12</version>
|
||||
<version>42.7.11</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
+7
-7
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-json</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -52,7 +52,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -157,21 +157,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -334,12 +334,6 @@ public interface SpiEbeanServer extends SpiServer, BeanCollectionLoader {
|
||||
*/
|
||||
int executeNow(SpiSqlUpdate sqlUpdate);
|
||||
|
||||
/**
|
||||
* Execute the sql update regardless of transaction batch mode using the given
|
||||
* explicit transaction (or the current ambient transaction when null).
|
||||
*/
|
||||
int executeNow(SpiSqlUpdate sqlUpdate, @Nullable Transaction transaction);
|
||||
|
||||
/**
|
||||
* Create a query bind capture for the given query plan.
|
||||
*/
|
||||
|
||||
@@ -1938,12 +1938,7 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
|
||||
|
||||
@Override
|
||||
public int executeNow(SpiSqlUpdate sqlUpdate) {
|
||||
return executeNow(sqlUpdate, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeNow(SpiSqlUpdate sqlUpdate, @Nullable Transaction transaction) {
|
||||
return persister.executeSqlUpdateNow(sqlUpdate, transaction);
|
||||
return persister.executeSqlUpdateNow(sqlUpdate, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,6 @@ package io.ebeaninternal.server.core;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.SqlUpdate;
|
||||
import io.ebean.Transaction;
|
||||
import io.ebean.Update;
|
||||
import io.ebeaninternal.api.BindParams;
|
||||
import io.ebeaninternal.api.SpiEbeanServer;
|
||||
@@ -141,7 +140,7 @@ public final class DefaultSqlUpdate implements Serializable, SpiSqlUpdate {
|
||||
server.executeBatch(this, transaction);
|
||||
return -1;
|
||||
}
|
||||
return server.execute(this, transaction);
|
||||
return server.execute(this);
|
||||
} else {
|
||||
// Hopefully this doesn't catch anyone out...
|
||||
return DB.getDefault().execute(this);
|
||||
@@ -151,18 +150,12 @@ public final class DefaultSqlUpdate implements Serializable, SpiSqlUpdate {
|
||||
@Override
|
||||
public int executeNow() {
|
||||
if (server != null) {
|
||||
return server.executeNow(this, transaction);
|
||||
return server.executeNow(this);
|
||||
} else {
|
||||
throw new IllegalStateException("server is null?");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqlUpdate usingTransaction(Transaction transaction) {
|
||||
this.transaction = (SpiTransaction) transaction;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] executeBatch() {
|
||||
if (server == null) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.ebeaninternal.server.querydefn;
|
||||
|
||||
import io.ebean.Database;
|
||||
import io.ebean.Transaction;
|
||||
import io.ebean.Update;
|
||||
import io.ebeaninternal.api.BindParams;
|
||||
import io.ebeaninternal.api.SpiUpdate;
|
||||
@@ -31,7 +30,6 @@ public final class DefaultOrmUpdate<T> implements SpiUpdate<T>, Serializable {
|
||||
private String generatedSql;
|
||||
private final String baseTable;
|
||||
private final OrmUpdateType type;
|
||||
private transient Transaction transaction;
|
||||
|
||||
/**
|
||||
* Create with a specific server. This means you can use the
|
||||
@@ -90,13 +88,7 @@ public final class DefaultOrmUpdate<T> implements SpiUpdate<T>, Serializable {
|
||||
|
||||
@Override
|
||||
public int execute() {
|
||||
return server.execute(this, transaction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DefaultOrmUpdate<T> usingTransaction(Transaction transaction) {
|
||||
this.transaction = transaction;
|
||||
return this;
|
||||
return server.execute(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-22
@@ -281,17 +281,6 @@ public final class DefaultRelationalQuery extends AbstractQuery implements SpiSq
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeQuery<T> usingConnection(Connection connection) {
|
||||
DefaultRelationalQuery.this.usingConnection(connection);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel() {
|
||||
DefaultRelationalQuery.this.cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public T findOne() {
|
||||
return findSingleAttribute(type);
|
||||
@@ -337,17 +326,6 @@ public final class DefaultRelationalQuery extends AbstractQuery implements SpiSq
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypeQuery<T> usingConnection(Connection connection) {
|
||||
DefaultRelationalQuery.this.usingConnection(connection);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel() {
|
||||
DefaultRelationalQuery.this.cancel();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public T findOne() {
|
||||
|
||||
@@ -88,8 +88,8 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
this.databasePlatform = config.getDatabasePlatform();
|
||||
this.postgres = isPostgresCompatible(config.getDatabasePlatform());
|
||||
this.objectMapperPresent = config.getClassLoadConfig().isJacksonObjectMapperPresent();
|
||||
this.objectMapper = (objectMapperPresent) ? initObjectMapper(config) : config.getObjectMapper();
|
||||
this.jsonManager = new TypeJsonManager(postgres, objectMapper, config.getJsonMutationDetection());
|
||||
this.objectMapper = (objectMapperPresent) ? initObjectMapper(config) : null;
|
||||
this.jsonManager = (objectMapperPresent) ? new TypeJsonManager(postgres, objectMapper, config.getJsonMutationDetection()) : null;
|
||||
this.extraTypeFactory = new DefaultTypeFactory(config);
|
||||
this.arrayTypeListFactory = arrayTypeListFactory(config.getDatabasePlatform());
|
||||
this.arrayTypeSetFactory = arrayTypeSetFactory(config.getDatabasePlatform());
|
||||
@@ -413,7 +413,7 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
|
||||
private ScalarType<?> createJsonObjectMapperType(DeployProperty prop, int dbType, DocPropertyType docType) {
|
||||
if (jsonMapper == null) {
|
||||
throw new IllegalArgumentException("Unsupported @DbJson mapping - missing JSON mapper dependency for " + prop);
|
||||
throw new IllegalArgumentException("Unsupported @DbJson mapping - Missing dependency ebean-jackson-mapper? Jackson ObjectMapper not present for " + prop);
|
||||
}
|
||||
if (MutationDetection.DEFAULT == prop.mutationDetection()) {
|
||||
prop.setMutationDetection(jsonManager.mutationDetection());
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+5
-10
@@ -1,19 +1,14 @@
|
||||
package io.ebean.core.type;
|
||||
package io.ebean.jackson.mapper;
|
||||
|
||||
/**
|
||||
* Helper that removes whitespace from JSON content.
|
||||
* <p>
|
||||
* Used to normalise PostgreSQL JSONB content before it is retained for mutation detection.
|
||||
* Helper that removes whitespace from JSON. Used to normalise Postgres JSONB content.
|
||||
*/
|
||||
public final class JsonTrim {
|
||||
|
||||
private JsonTrim() {
|
||||
}
|
||||
final class JsonTrim {
|
||||
|
||||
/**
|
||||
* Return JSON with whitespace trimmed.
|
||||
*/
|
||||
public static String trim(String json) {
|
||||
static String trim(String json) {
|
||||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -23,7 +18,7 @@ public final class JsonTrim {
|
||||
boolean quoted = false;
|
||||
for (int i = 0; i < len; i++) {
|
||||
char c = json.charAt(i);
|
||||
if (c == '"') {
|
||||
if (c == '\"') {
|
||||
if (!escaped) {
|
||||
quoted = !quoted;
|
||||
} else {
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.ebean.jackson.mapper;
|
||||
|
||||
import io.ebean.core.type.JsonTrim;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean net postgis types</name>
|
||||
@@ -19,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-opentelemetry</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -71,21 +71,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean pgvector types</name>
|
||||
@@ -19,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis types</name>
|
||||
@@ -19,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.7.12</version>
|
||||
<version>42.7.11</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -29,35 +29,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ ebean:
|
||||
dumpMetricsOptions: sql,hash,loc
|
||||
test:
|
||||
registerTestTenantProvider: false
|
||||
redis: 8.6.2
|
||||
redis: latest
|
||||
# shutdown: stop # stop | remove
|
||||
platform: h2 # h2, postgres, mysql, oracle, sqlserver, sqlite
|
||||
ddlMode: dropCreate # none | dropCreate | create | migration | createOnly | migrationDropCreate
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redisson</artifactId>
|
||||
@@ -29,35 +29,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+2
-2
@@ -10,13 +10,13 @@ import jakarta.persistence.Entity;
|
||||
@SuppressWarnings("unused")
|
||||
@Cache(naturalKey = {"one", "two"})
|
||||
@Entity
|
||||
public class FOtherOne extends EBase {
|
||||
public class OtherOne extends EBase {
|
||||
|
||||
private final String one;
|
||||
private final String two;
|
||||
private String notes;
|
||||
|
||||
public FOtherOne(String one, String two, String notes) {
|
||||
public OtherOne(String one, String two, String notes) {
|
||||
this.one = one;
|
||||
this.two = two;
|
||||
this.notes = notes;
|
||||
+2
-2
@@ -11,7 +11,7 @@ import java.time.LocalDate;
|
||||
@Cache(enableQueryCache = true, nearCache = true, naturalKey = "name")
|
||||
@CacheBeanTuning(maxSecsToLive = 1)
|
||||
@Entity
|
||||
public class FPerson extends EBase {
|
||||
public class Person extends EBase {
|
||||
|
||||
public enum Status {
|
||||
NEW,
|
||||
@@ -33,7 +33,7 @@ public class FPerson extends EBase {
|
||||
*/
|
||||
String key;
|
||||
|
||||
public FPerson(String name) {
|
||||
public Person(String name) {
|
||||
this.name = name;
|
||||
this.status = Status.NEW;
|
||||
}
|
||||
+2
-2
@@ -7,12 +7,12 @@ import jakarta.persistence.Entity;
|
||||
|
||||
@Cache(naturalKey = "name")
|
||||
@Entity
|
||||
public class FRCust extends EBase {
|
||||
public class RCust extends EBase {
|
||||
|
||||
@Index(unique = true)
|
||||
String name;
|
||||
|
||||
public FRCust(String name) {
|
||||
public RCust(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ import jakarta.persistence.ManyToOne;
|
||||
|
||||
@Cache
|
||||
@Entity
|
||||
public class FUChild extends Model {
|
||||
public class UChild extends Model {
|
||||
|
||||
@Id
|
||||
long id;
|
||||
@@ -16,9 +16,9 @@ public class FUChild extends Model {
|
||||
String name;
|
||||
|
||||
@ManyToOne
|
||||
final FUParent parent;
|
||||
final UParent parent;
|
||||
|
||||
public FUChild(FUParent parent, String name) {
|
||||
public UChild(UParent parent, String name) {
|
||||
this.parent = parent;
|
||||
this.name = name;
|
||||
}
|
||||
+4
-4
@@ -15,7 +15,7 @@ import java.util.UUID;
|
||||
@Cache(enableQueryCache = true)
|
||||
@CacheBeanTuning(maxSecsToLive = 1)
|
||||
@Entity
|
||||
public class FUParent extends Model {
|
||||
public class UParent extends Model {
|
||||
|
||||
@Id
|
||||
private UUID id;
|
||||
@@ -23,9 +23,9 @@ public class FUParent extends Model {
|
||||
private String name;
|
||||
|
||||
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
|
||||
private final List<FUChild> children = new ArrayList<>();
|
||||
private final List<UChild> children = new ArrayList<>();
|
||||
|
||||
public FUParent(String name) {
|
||||
public UParent(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class FUParent extends Model {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<FUChild> children() {
|
||||
public List<UChild> children() {
|
||||
return children;
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
|
||||
@Cache
|
||||
@Entity
|
||||
public class RTestOne extends Model {
|
||||
public class TestOne extends Model {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
@@ -18,9 +18,9 @@ public class RTestOne extends Model {
|
||||
private String otherUnique;
|
||||
|
||||
@OneToMany(mappedBy = "testOne", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private List<RTestTwo> testTwos = new ArrayList<>();
|
||||
private List<TestTwo> testTwos = new ArrayList<>();
|
||||
|
||||
public RTestOne(String id, String otherUnique) {
|
||||
public TestOne(String id, String otherUnique) {
|
||||
this.id = id;
|
||||
this.otherUnique = otherUnique;
|
||||
}
|
||||
@@ -37,11 +37,11 @@ public class RTestOne extends Model {
|
||||
this.otherUnique = otherUnique;
|
||||
}
|
||||
|
||||
public List<RTestTwo> getTestTwos() {
|
||||
public List<TestTwo> getTestTwos() {
|
||||
return testTwos;
|
||||
}
|
||||
|
||||
public void setTestTwos(List<RTestTwo> testTwos) {
|
||||
public void setTestTwos(List<TestTwo> testTwos) {
|
||||
this.testTwos = testTwos;
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -7,16 +7,16 @@ import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
|
||||
@Entity
|
||||
public class RTestTwo extends Model {
|
||||
public class TestTwo extends Model {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn
|
||||
private RTestOne testOne;
|
||||
private TestOne testOne;
|
||||
|
||||
public RTestTwo(String id) {
|
||||
public TestTwo(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ public class RTestTwo extends Model {
|
||||
return id;
|
||||
}
|
||||
|
||||
public RTestOne getTestOne() {
|
||||
public TestOne getTestOne() {
|
||||
return testOne;
|
||||
}
|
||||
|
||||
public void setTestOne(RTestOne testOne) {
|
||||
public void setTestOne(TestOne testOne) {
|
||||
this.testOne = testOne;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@ package org.integration;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Database;
|
||||
import io.ebean.redisson.DuelCache;
|
||||
import org.domain.FPerson;
|
||||
import org.domain.query.QFPerson;
|
||||
import org.domain.Person;
|
||||
import org.domain.query.QPerson;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -37,65 +37,65 @@ class ClusterTest {
|
||||
|
||||
@Test
|
||||
void testBothNear() throws InterruptedException {
|
||||
new QFPerson()
|
||||
new QPerson()
|
||||
.name.eq("Someone")
|
||||
.delete();
|
||||
|
||||
FPerson foo = new FPerson("Someone");
|
||||
Person foo = new Person("Someone");
|
||||
foo.save();
|
||||
|
||||
DB.cacheManager().clearAll();
|
||||
db.metaInfo().resetAllMetrics();
|
||||
other.metaInfo().resetAllMetrics();
|
||||
|
||||
FPerson fooA = DB.find(FPerson.class, foo.getId());
|
||||
Person fooA = DB.find(Person.class, foo.getId());
|
||||
allowAsyncMessaging(); // allow time for background cache load
|
||||
FPerson fooB = other.find(FPerson.class, foo.getId());
|
||||
Person fooB = other.find(Person.class, foo.getId());
|
||||
|
||||
DuelCache dualCacheA = db.cacheManager().beanCache(FPerson.class).unwrap(DuelCache.class);
|
||||
DuelCache dualCacheA = db.cacheManager().beanCache(Person.class).unwrap(DuelCache.class);
|
||||
assertCounts(dualCacheA, 0, 1, 0, 1);
|
||||
fooA = DB.find(FPerson.class, foo.getId());
|
||||
fooA = DB.find(Person.class, foo.getId());
|
||||
assertCounts(dualCacheA, 1, 1, 0, 1);
|
||||
fooB = other.find(FPerson.class, foo.getId());
|
||||
fooA = DB.find(FPerson.class, foo.getId());
|
||||
fooB = other.find(Person.class, foo.getId());
|
||||
fooA = DB.find(Person.class, foo.getId());
|
||||
assertCounts(dualCacheA, 2, 1, 0, 1);
|
||||
fooB = other.find(FPerson.class, foo.getId());
|
||||
DuelCache dualCacheB = other.cacheManager().beanCache(FPerson.class).unwrap(DuelCache.class);
|
||||
fooB = other.find(Person.class, foo.getId());
|
||||
DuelCache dualCacheB = other.cacheManager().beanCache(Person.class).unwrap(DuelCache.class);
|
||||
assertCounts(dualCacheB, 2, 1, 1, 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
void test() throws InterruptedException {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
FPerson foo = new FPerson("name " + i);
|
||||
Person foo = new Person("name " + i);
|
||||
foo.save();
|
||||
}
|
||||
|
||||
other.cacheManager().clearAll();
|
||||
other.metaInfo().resetAllMetrics();
|
||||
|
||||
DuelCache dualCache = other.cacheManager().beanCache(FPerson.class).unwrap(DuelCache.class);
|
||||
DuelCache dualCache = other.cacheManager().beanCache(Person.class).unwrap(DuelCache.class);
|
||||
|
||||
FPerson foo0 = other.find(FPerson.class, 1);
|
||||
Person foo0 = other.find(Person.class, 1);
|
||||
assertCounts(dualCache, 0, 1, 0, 1);
|
||||
|
||||
other.find(FPerson.class, 1);
|
||||
other.find(Person.class, 1);
|
||||
assertCounts(dualCache, 1, 1, 0, 1);
|
||||
|
||||
other.find(FPerson.class, 1);
|
||||
other.find(Person.class, 1);
|
||||
assertCounts(dualCache, 2, 1, 0, 1);
|
||||
|
||||
other.find(FPerson.class, 1);
|
||||
other.find(Person.class, 1);
|
||||
assertCounts(dualCache, 3, 1, 0, 1);
|
||||
|
||||
other.find(FPerson.class, 2);
|
||||
other.find(Person.class, 2);
|
||||
assertCounts(dualCache, 3, 2, 0, 2);
|
||||
|
||||
foo0.setName("name2");
|
||||
foo0.save();
|
||||
allowAsyncMessaging();
|
||||
|
||||
FPerson foo3 = other.find(FPerson.class, 1);
|
||||
Person foo3 = other.find(Person.class, 1);
|
||||
assertThat(foo3.getName()).isEqualTo("name2");
|
||||
assertCounts(dualCache, 3, 3, 1, 2);
|
||||
|
||||
@@ -103,7 +103,7 @@ class ClusterTest {
|
||||
foo0.save();
|
||||
allowAsyncMessaging();
|
||||
|
||||
foo3 = other.find(FPerson.class, 1);
|
||||
foo3 = other.find(Person.class, 1);
|
||||
assertThat(foo3.getName()).isEqualTo("name3");
|
||||
assertCounts(dualCache, 3, 4, 2, 2);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ import io.ebean.cache.ServerCache;
|
||||
import io.ebean.cache.ServerCacheStatistics;
|
||||
import io.ebeaninternal.server.cache.CachedBeanData;
|
||||
import org.domain.*;
|
||||
import org.domain.query.QFOtherOne;
|
||||
import org.domain.query.QFPerson;
|
||||
import org.domain.query.QFRCust;
|
||||
import org.domain.test.RTestOne;
|
||||
import org.domain.query.QOtherOne;
|
||||
import org.domain.query.QPerson;
|
||||
import org.domain.query.QRCust;
|
||||
import org.domain.test.TestOne;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.time.LocalDate;
|
||||
@@ -21,8 +21,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class IntegrationTest {
|
||||
|
||||
private static FOtherOne findOther(String a, String b) {
|
||||
return new QFOtherOne()
|
||||
private static OtherOne findOther(String a, String b) {
|
||||
return new QOtherOne()
|
||||
.one.eq(a)
|
||||
.two.eq(b)
|
||||
.findOne();
|
||||
@@ -30,22 +30,22 @@ class IntegrationTest {
|
||||
|
||||
@Test
|
||||
void uuid_getPut() {
|
||||
FUParent b0 = new FUParent("b0");
|
||||
b0.children().add(new FUChild(b0, "b0c0"));
|
||||
b0.children().add(new FUChild(b0, "b0c1"));
|
||||
UParent b0 = new UParent("b0");
|
||||
b0.children().add(new UChild(b0, "b0c0"));
|
||||
b0.children().add(new UChild(b0, "b0c1"));
|
||||
b0.save();
|
||||
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(FUParent.class);
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(UParent.class);
|
||||
beanCache.clear();
|
||||
beanCache.statistics(true);
|
||||
|
||||
FUParent found0 = DB.find(FUParent.class, b0.id());
|
||||
UParent found0 = DB.find(UParent.class, b0.id());
|
||||
assertThat(found0.name()).isEqualTo("b0");
|
||||
|
||||
List<FUChild> children = found0.children();
|
||||
List<UChild> children = found0.children();
|
||||
assertThat(children).hasSize(2);
|
||||
|
||||
FUParent found1 = DB.find(FUParent.class, b0.id());
|
||||
UParent found1 = DB.find(UParent.class, b0.id());
|
||||
assertThat(found1.name()).isEqualTo("b0");
|
||||
|
||||
DB.delete(found1);
|
||||
@@ -57,13 +57,13 @@ class IntegrationTest {
|
||||
@Test
|
||||
void mget_when_emptyCollectionOfIds() {
|
||||
|
||||
List<FRCust> f0 = new QFRCust()
|
||||
List<RCust> f0 = new QRCust()
|
||||
.setIdIn(Collections.emptyList())
|
||||
.findList();
|
||||
|
||||
assertThat(f0).isEmpty();
|
||||
|
||||
List<FRCust> f1 = new QFRCust()
|
||||
List<RCust> f1 = new QRCust()
|
||||
.id.in(Collections.emptyList())
|
||||
.findList();
|
||||
|
||||
@@ -73,18 +73,18 @@ class IntegrationTest {
|
||||
@Test
|
||||
void mput_via_setIdIn() throws InterruptedException {
|
||||
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(FRCust.class);
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(RCust.class);
|
||||
beanCache.clear();
|
||||
beanCache.statistics(true);
|
||||
|
||||
List<FRCust> people = new ArrayList<>();
|
||||
List<RCust> people = new ArrayList<>();
|
||||
for (String name : new String[]{"mp0", "mp1", "mp2"}) {
|
||||
people.add(new FRCust(name));
|
||||
people.add(new RCust(name));
|
||||
}
|
||||
DB.saveAll(people);
|
||||
List<Long> ids = people.stream().map(FRCust::getId).collect(Collectors.toList());
|
||||
List<Long> ids = people.stream().map(RCust::getId).collect(Collectors.toList());
|
||||
|
||||
List<FRCust> f0 = new QFRCust()
|
||||
List<RCust> f0 = new QRCust()
|
||||
.setIdIn(ids) // using collection argument
|
||||
.findList();
|
||||
|
||||
@@ -95,7 +95,7 @@ class IntegrationTest {
|
||||
Thread.sleep(5);
|
||||
|
||||
// we will hit the cache this time
|
||||
List<FRCust> f1 = new QFRCust()
|
||||
List<RCust> f1 = new QRCust()
|
||||
.setIdIn(ids.toArray()) // using varargs argument
|
||||
.findList();
|
||||
|
||||
@@ -104,7 +104,7 @@ class IntegrationTest {
|
||||
assertThat(stats1.getHitCount()).isEqualTo(3);
|
||||
|
||||
// we will hit the cache again
|
||||
List<FRCust> f2 = new QFRCust()
|
||||
List<RCust> f2 = new QRCust()
|
||||
.setIdIn(ids) // using collection argument
|
||||
.findList();
|
||||
assertThat(f2).hasSize(3);
|
||||
@@ -115,18 +115,18 @@ class IntegrationTest {
|
||||
@Test
|
||||
void mput_via_propertyInExpression() throws InterruptedException {
|
||||
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(FRCust.class);
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(RCust.class);
|
||||
beanCache.clear();
|
||||
beanCache.statistics(true);
|
||||
|
||||
List<FRCust> people = new ArrayList<>();
|
||||
List<RCust> people = new ArrayList<>();
|
||||
for (String name : new String[]{"mpx0", "mpx1", "mpx2"}) {
|
||||
people.add(new FRCust(name));
|
||||
people.add(new RCust(name));
|
||||
}
|
||||
DB.saveAll(people);
|
||||
List<Long> ids = people.stream().map(FRCust::getId).collect(Collectors.toList());
|
||||
List<Long> ids = people.stream().map(RCust::getId).collect(Collectors.toList());
|
||||
|
||||
List<FRCust> f0 = new QFRCust()
|
||||
List<RCust> f0 = new QRCust()
|
||||
.id.in(ids)
|
||||
.findList();
|
||||
|
||||
@@ -137,7 +137,7 @@ class IntegrationTest {
|
||||
Thread.sleep(5);
|
||||
|
||||
// we will hit the cache this time
|
||||
List<FRCust> f1 = new QFRCust()
|
||||
List<RCust> f1 = new QRCust()
|
||||
.id.in(ids)
|
||||
.findList();
|
||||
|
||||
@@ -146,7 +146,7 @@ class IntegrationTest {
|
||||
assertThat(stats1.getHitCount()).isEqualTo(3);
|
||||
|
||||
// we will hit the cache again
|
||||
List<FRCust> f2 = new QFRCust()
|
||||
List<RCust> f2 = new QRCust()
|
||||
.id.isIn(ids)
|
||||
.findList();
|
||||
assertThat(f2).hasSize(3);
|
||||
@@ -156,18 +156,18 @@ class IntegrationTest {
|
||||
|
||||
@Test
|
||||
void testOtherOne() {
|
||||
DB.save(new FOtherOne("A", "B", "ab"));
|
||||
DB.save(new FOtherOne("A", "C", "ac"));
|
||||
DB.save(new FOtherOne("B", "B", "bb"));
|
||||
DB.save(new OtherOne("A", "B", "ab"));
|
||||
DB.save(new OtherOne("A", "C", "ac"));
|
||||
DB.save(new OtherOne("B", "B", "bb"));
|
||||
|
||||
ServerCache nkeyCache = DB.cacheManager().naturalKeyCache(FOtherOne.class);
|
||||
ServerCache nkeyCache = DB.cacheManager().naturalKeyCache(OtherOne.class);
|
||||
nkeyCache.clear();
|
||||
nkeyCache.statistics(true);
|
||||
|
||||
FOtherOne ab0 = findOther("A", "B");
|
||||
FOtherOne ab1 = findOther("A", "B");
|
||||
FOtherOne ab2 = findOther("A", "B");
|
||||
FOtherOne bb = findOther("B", "B");
|
||||
OtherOne ab0 = findOther("A", "B");
|
||||
OtherOne ab1 = findOther("A", "B");
|
||||
OtherOne ab2 = findOther("A", "B");
|
||||
OtherOne bb = findOther("B", "B");
|
||||
|
||||
assertThat(ab0).isNotNull();
|
||||
assertThat(ab1).isNotNull();
|
||||
@@ -183,21 +183,21 @@ class IntegrationTest {
|
||||
|
||||
insertSomePeople();
|
||||
|
||||
FPerson fiona = findByName("Fiona");
|
||||
Person fiona = findByName("Fiona");
|
||||
fiona.setName("Fortuna");
|
||||
fiona.setLocalDate(LocalDate.now());
|
||||
fiona.update();
|
||||
|
||||
Thread.sleep(100);
|
||||
|
||||
FPerson one = findById(1);
|
||||
Person one = findById(1);
|
||||
assertThat(one).isNotNull();
|
||||
|
||||
for (int i = 1; i < 4; i++) {
|
||||
System.out.println("hit " + findById(i));
|
||||
}
|
||||
|
||||
List<FPerson> one2 = nameStartsWith("fo");
|
||||
List<Person> one2 = nameStartsWith("fo");
|
||||
assertThat(one2).hasSize(1);
|
||||
|
||||
one2 = nameStartsWith("j");
|
||||
@@ -207,7 +207,7 @@ class IntegrationTest {
|
||||
assertThat(one2).hasSize(2);
|
||||
|
||||
|
||||
List<FPerson> byNames = findByNames("Jack", "Rob");
|
||||
List<Person> byNames = findByNames("Jack", "Rob");
|
||||
assertThat(byNames).hasSize(2);
|
||||
|
||||
byNames = findByNames("Jack", "Rob", "Moby");
|
||||
@@ -228,40 +228,40 @@ class IntegrationTest {
|
||||
|
||||
System.out.println("one2 " + one2);
|
||||
|
||||
DB.cacheManager().clear(FPerson.class);
|
||||
DB.cacheManager().clear(Person.class);
|
||||
|
||||
System.out.println("done");
|
||||
}
|
||||
|
||||
private void insertSomePeople() {
|
||||
List<FPerson> people = new ArrayList<>();
|
||||
List<Person> people = new ArrayList<>();
|
||||
for (String name : new String[]{"Jack", "John", "Rob", "Moby", "Fiona"}) {
|
||||
people.add(new FPerson(name));
|
||||
people.add(new Person(name));
|
||||
}
|
||||
DB.saveAll(people);
|
||||
}
|
||||
|
||||
private FPerson findByName(String name) {
|
||||
return new QFPerson()
|
||||
private Person findByName(String name) {
|
||||
return new QPerson()
|
||||
.name.eq(name)
|
||||
.findOne();
|
||||
}
|
||||
|
||||
private List<FPerson> findByNames(String... names) {
|
||||
return new QFPerson()
|
||||
private List<Person> findByNames(String... names) {
|
||||
return new QPerson()
|
||||
.name.in(names)
|
||||
.setUseCache(true)
|
||||
.findList();
|
||||
}
|
||||
|
||||
private FPerson findById(int id) {
|
||||
return new QFPerson()
|
||||
private Person findById(int id) {
|
||||
return new QPerson()
|
||||
.id.eq(id)
|
||||
.findOne();
|
||||
}
|
||||
|
||||
private List<FPerson> nameStartsWith(String pattern) {
|
||||
return new QFPerson()
|
||||
private List<Person> nameStartsWith(String pattern) {
|
||||
return new QPerson()
|
||||
.name.istartsWith(pattern)
|
||||
.setUseQueryCache(true)
|
||||
.findList();
|
||||
@@ -273,15 +273,15 @@ class IntegrationTest {
|
||||
*/
|
||||
@Test
|
||||
void versionGated_newerCached_staleWriteIsIgnored() throws InterruptedException {
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(FRCust.class);
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(RCust.class);
|
||||
beanCache.clear();
|
||||
|
||||
FRCust cust = new FRCust("stale-test-orig");
|
||||
RCust cust = new RCust("stale-test-orig");
|
||||
DB.save(cust);
|
||||
long id = cust.getId();
|
||||
|
||||
// prime cache at version 1
|
||||
DB.find(FRCust.class, id);
|
||||
DB.find(RCust.class, id);
|
||||
Thread.sleep(150);
|
||||
Object staleV1 = beanCache.get(id);
|
||||
assertThat(staleV1).isNotNull();
|
||||
@@ -289,7 +289,7 @@ class IntegrationTest {
|
||||
// update to version 2; ensure v2 is in cache
|
||||
cust.setName("stale-test-updated");
|
||||
DB.save(cust);
|
||||
DB.find(FRCust.class, id);
|
||||
DB.find(RCust.class, id);
|
||||
Thread.sleep(150);
|
||||
|
||||
// stale write attempt: v2 is cached, v1 should be rejected
|
||||
@@ -302,7 +302,7 @@ class IntegrationTest {
|
||||
assertThat(((CachedBeanData) staleV2).getVersion()).isEqualTo(2L);
|
||||
|
||||
beanCache.statistics(true);
|
||||
FRCust found = DB.find(FRCust.class, id);
|
||||
RCust found = DB.find(RCust.class, id);
|
||||
ServerCacheStatistics stats = beanCache.statistics(true);
|
||||
assertThat(stats.getHitCount()).isEqualTo(1);
|
||||
assertThat(found.getVersion()).isEqualTo(2L);
|
||||
@@ -316,14 +316,14 @@ class IntegrationTest {
|
||||
*/
|
||||
@Test
|
||||
void zeroVersion_equalVersion_staleWriteIsNotBlocked() throws InterruptedException {
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(RTestOne.class);
|
||||
ServerCache beanCache = DB.cacheManager().beanCache(TestOne.class);
|
||||
beanCache.clear();
|
||||
|
||||
RTestOne t1 = new RTestOne("zvw-test", "unique-a");
|
||||
TestOne t1 = new TestOne("zvw-test", "unique-a");
|
||||
DB.save(t1);
|
||||
|
||||
// prime cache at version 0 (no @Version field)
|
||||
DB.find(RTestOne.class, "zvw-test");
|
||||
DB.find(TestOne.class, "zvw-test");
|
||||
Thread.sleep(150);
|
||||
Object staleV0 = beanCache.get("zvw-test");
|
||||
assertThat(staleV0).isNotNull();
|
||||
@@ -331,7 +331,7 @@ class IntegrationTest {
|
||||
// update; ensure new v0 is in cache
|
||||
t1.setOtherUnique("unique-b");
|
||||
DB.save(t1);
|
||||
DB.find(RTestOne.class, "zvw-test");
|
||||
DB.find(TestOne.class, "zvw-test");
|
||||
Thread.sleep(150);
|
||||
|
||||
// stale write: v0 in cache, incoming v0 — must NOT be blocked (0 > 0 is false)
|
||||
@@ -339,7 +339,7 @@ class IntegrationTest {
|
||||
|
||||
// stale data should now be in cache (unlike the versioned case above)
|
||||
beanCache.statistics(true);
|
||||
RTestOne found = DB.find(RTestOne.class, "zvw-test");
|
||||
TestOne found = DB.find(TestOne.class, "zvw-test");
|
||||
ServerCacheStatistics stats = beanCache.statistics(true);
|
||||
assertThat(stats.getHitCount()).isEqualTo(1);
|
||||
assertThat(found.getOtherUnique()).isEqualTo("unique-a");
|
||||
|
||||
@@ -4,7 +4,8 @@ import io.ebean.DB;
|
||||
import io.ebean.Database;
|
||||
import io.ebean.cache.ServerCache;
|
||||
import io.ebean.cache.ServerCacheStatistics;
|
||||
import org.domain.FRCust;
|
||||
import org.domain.RCust;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -35,27 +36,27 @@ class RedissonTenantAwareCacheTest {
|
||||
void singleBean_tenantA_hits_tenantB_misses() {
|
||||
Database db = buildTenantDb();
|
||||
try {
|
||||
FRCust cust = new FRCust("t-single-iso");
|
||||
RCust cust = new RCust("t-single-iso");
|
||||
DB.save(cust);
|
||||
long id = cust.getId();
|
||||
|
||||
ServerCache beanCache = db.cacheManager().beanCache(FRCust.class);
|
||||
ServerCache beanCache = db.cacheManager().beanCache(RCust.class);
|
||||
beanCache.clear();
|
||||
|
||||
// Tenant A: first load – goes to DB
|
||||
TENANT.set("tenantA");
|
||||
beanCache.statistics(true); // reset counters
|
||||
assertThat(db.find(FRCust.class, id)).isNotNull();
|
||||
assertThat(db.find(RCust.class, id)).isNotNull();
|
||||
assertThat(Objects.requireNonNull(beanCache.statistics(true)).getMissCount()).isEqualTo(1);
|
||||
|
||||
// Tenant A: second load – must hit cache
|
||||
assertThat(db.find(FRCust.class, id)).isNotNull();
|
||||
assertThat(db.find(RCust.class, id)).isNotNull();
|
||||
assertThat(Objects.requireNonNull(beanCache.statistics(true)).getHitCount()).isEqualTo(1);
|
||||
|
||||
// Tenant B: same ID, different tenant key – must miss
|
||||
TENANT.set("tenantB");
|
||||
beanCache.statistics(true); // reset counters
|
||||
assertThat(db.find(FRCust.class, id)).isNotNull();
|
||||
assertThat(db.find(RCust.class, id)).isNotNull();
|
||||
ServerCacheStatistics statsB = beanCache.statistics(true);
|
||||
assertNotNull(statsB);
|
||||
assertThat(statsB.getHitCount()).isEqualTo(0);
|
||||
@@ -71,26 +72,26 @@ class RedissonTenantAwareCacheTest {
|
||||
void getAll_tenantA_hits_tenantB_misses() throws InterruptedException {
|
||||
Database db = buildTenantDb();
|
||||
try {
|
||||
List<FRCust> custs = new ArrayList<>();
|
||||
List<RCust> custs = new ArrayList<>();
|
||||
for (String n : new String[]{"tga0", "tga1", "tga2"}) {
|
||||
custs.add(new FRCust(n));
|
||||
custs.add(new RCust(n));
|
||||
}
|
||||
DB.saveAll(custs);
|
||||
List<Long> ids = custs.stream().map(FRCust::getId).collect(Collectors.toList());
|
||||
List<Long> ids = custs.stream().map(RCust::getId).collect(Collectors.toList());
|
||||
|
||||
ServerCache beanCache = db.cacheManager().beanCache(FRCust.class);
|
||||
ServerCache beanCache = db.cacheManager().beanCache(RCust.class);
|
||||
beanCache.clear();
|
||||
|
||||
// Tenant A: first batch load – DB misses, cache populated
|
||||
TENANT.set("tenantA");
|
||||
List<FRCust> listA0 = db.find(FRCust.class).where().idIn(ids).setUseCache(true).findList();
|
||||
List<RCust> listA0 = db.find(RCust.class).where().idIn(ids).setUseCache(true).findList();
|
||||
assertThat(listA0).hasSize(3);
|
||||
|
||||
Thread.sleep(10);
|
||||
|
||||
// Tenant A: second batch load – all 3 must be cache hits
|
||||
beanCache.statistics(true); // reset
|
||||
List<FRCust> listA1 = db.find(FRCust.class).where().idIn(ids).setUseCache(true).findList();
|
||||
List<RCust> listA1 = db.find(RCust.class).where().idIn(ids).setUseCache(true).findList();
|
||||
assertThat(listA1).hasSize(3);
|
||||
ServerCacheStatistics statsA = beanCache.statistics(true);
|
||||
assertNotNull(statsA);
|
||||
@@ -100,7 +101,7 @@ class RedissonTenantAwareCacheTest {
|
||||
// Tenant B: same IDs, different tenant – all 3 must miss
|
||||
TENANT.set("tenantB");
|
||||
beanCache.statistics(true); // reset
|
||||
List<FRCust> listB = db.find(FRCust.class).where().idIn(ids).setUseCache(true).findList();
|
||||
List<RCust> listB = db.find(RCust.class).where().idIn(ids).setUseCache(true).findList();
|
||||
assertThat(listB).hasSize(3);
|
||||
ServerCacheStatistics statsB = beanCache.statistics(true);
|
||||
assertNotNull(statsB);
|
||||
|
||||
@@ -3,7 +3,7 @@ ebean:
|
||||
dumpMetricsOptions: sql,hash,loc
|
||||
test:
|
||||
registerTestTenantProvider: false
|
||||
redis: 8.6.2
|
||||
redis: latest
|
||||
# shutdown: stop # stop | remove
|
||||
platform: h2 # h2, postgres, mysql, oracle, sqlserver, sqlite
|
||||
ddlMode: dropCreate # none | dropCreate | create | migration | createOnly | migrationDropCreate
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
singleServerConfig:
|
||||
address: "redis://127.0.0.1:6379"
|
||||
password: null
|
||||
# ebean-redis test clients use database 0 in the shared Redis container.
|
||||
database: 1
|
||||
database: 0
|
||||
connectionMinimumIdleSize: 2
|
||||
connectionPoolSize: 10
|
||||
idleConnectionTimeout: 3000
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -33,20 +33,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -149,14 +149,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@ package io.ebean.xtest.base;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.ProfileLocation;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.meta.MetaQueryPlan;
|
||||
import io.ebean.meta.QueryPlanInit;
|
||||
import io.ebean.meta.QueryPlanRequest;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.xtest.IgnorePlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.Customer;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
@@ -82,7 +80,6 @@ class DtoQueryPlanCaptureTest extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@IgnorePlatform(Platform.DB2)
|
||||
void nativeDtoQuery_capturesQueryPlan() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -130,7 +127,6 @@ class DtoQueryPlanCaptureTest extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@IgnorePlatform(Platform.DB2)
|
||||
void nativeDtoQuery_withProfileLocation_capturesQueryPlan() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
|
||||
@@ -2,12 +2,10 @@ package io.ebean.xtest.base;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.SqlRow;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.meta.MetaQueryPlan;
|
||||
import io.ebean.meta.QueryPlanInit;
|
||||
import io.ebean.meta.QueryPlanRequest;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.xtest.IgnorePlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
|
||||
@@ -36,7 +34,6 @@ class SqlQueryPlanCaptureTest extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
@IgnorePlatform(Platform.DB2)
|
||||
void sqlQuery_capturesQueryPlan() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
|
||||
@@ -849,11 +849,6 @@ public class TDSpiEbeanServer extends TDSpiServer implements SpiEbeanServer {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int executeNow(SpiSqlUpdate sqlUpdate, Transaction transaction) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBatch(SpiSqlUpdate sqlUpdate, SpiTransaction transaction) {
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.tests.basic;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Transaction;
|
||||
import io.ebean.Update;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
@@ -73,29 +72,4 @@ public class TestUpdate extends BaseTestCase {
|
||||
Customer cust = DB.find(Customer.class).where().eq("name", "testUpdate3").findOne();
|
||||
assertThat(cust.getSmallnote()).isEqualTo("Note #3");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUsingTransaction_explicitNonAmbientTransaction() {
|
||||
Update<Customer> update = DB.createUpdate(Customer.class,
|
||||
"update customer set smallnote = :smallnote where name = :name")
|
||||
.setParameter("name", "testUpdate1")
|
||||
.setParameter("smallnote", "explicit txn note");
|
||||
|
||||
// ambient/current transaction on the thread - deliberately rolled back
|
||||
try (Transaction ambient = DB.beginTransaction()) {
|
||||
// explicit transaction - NOT the ambient/current one on the thread
|
||||
try (Transaction explicit = DB.createTransaction()) {
|
||||
update.usingTransaction(explicit);
|
||||
int rows = update.execute();
|
||||
assertThat(rows).isEqualTo(1);
|
||||
explicit.commit();
|
||||
}
|
||||
// rolling back the ambient transaction does not affect the update - it ran
|
||||
// against the explicit transaction which has already been committed above
|
||||
ambient.rollback();
|
||||
}
|
||||
|
||||
Customer cust = DB.find(Customer.class).where().eq("name", "testUpdate1").findOne();
|
||||
assertThat(cust.getSmallnote()).isEqualTo("explicit txn note");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,6 @@ public class TestInheritance extends BaseTestCase {
|
||||
|
||||
|
||||
server().save(grandparent1);
|
||||
var parent1Id = parent1.getIdentifier();
|
||||
|
||||
testMyDynamicFormulaWithIncludes();
|
||||
testMyDynamicFormulaWithIncludesAndFetchJoin();
|
||||
@@ -112,7 +111,7 @@ public class TestInheritance extends BaseTestCase {
|
||||
//grandparent1 = server().find(GrandParentPerson.class).setId(grandparent1.getIdentifier()).where()
|
||||
// .in("effectiveBean.id",2,null) // geht nicht!
|
||||
// .findOne();
|
||||
parent1 = server().find(ParentPerson.class).setId(parent1Id).fetch("someBean").findOne();
|
||||
parent1 = server().find(ParentPerson.class).setId(1).fetch("someBean").findOne();
|
||||
assertEquals("A Bean", parent1.getSomeBean().getName());
|
||||
grandparent1 = server().find(GrandParentPerson.class)
|
||||
.fetch("children", "*") // FIXME If I do not fetch childrenBean, I will get an exception
|
||||
|
||||
@@ -37,12 +37,11 @@ class TestHistoryOneToOne extends BaseTestCase {
|
||||
|
||||
@IgnorePlatform({Platform.ORACLE, Platform.COCKROACH})
|
||||
@Test
|
||||
void testVersionsWithHistoryOverHistoryless() throws InterruptedException {
|
||||
void testVersionsWithHistoryOverHistoryless() {
|
||||
HistorylessOneToOne historylessOneToOne = new HistorylessOneToOne("less");
|
||||
historylessOneToOne.setHistoryOneToOne(new HistoryOneToOne("one"));
|
||||
historylessOneToOne.setHistoryManyToOne(new HistoryManyToOne("many"));
|
||||
DB.save(historylessOneToOne);
|
||||
Thread.sleep(DB_CLOCK_DELTA);
|
||||
|
||||
LoggedSql.start();
|
||||
int count = DB.find(HistoryOneToOne.class)
|
||||
|
||||
@@ -195,58 +195,4 @@ public class TestSqlUpdateInTxn extends BaseTestCase {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUsingTransaction_explicitNonAmbientTransaction() {
|
||||
|
||||
AuditLog log = new AuditLog();
|
||||
log.setDescription("initial");
|
||||
DB.save(log);
|
||||
|
||||
SqlUpdate update = DB.sqlUpdate("update audit_log set description = ? where id = ?")
|
||||
.setParameter(1, "explicit")
|
||||
.setParameter(2, log.getId());
|
||||
|
||||
// ambient/current transaction on the thread - deliberately rolled back
|
||||
try (Transaction ambient = DB.beginTransaction()) {
|
||||
// explicit transaction - NOT the ambient/current one on the thread
|
||||
try (Transaction explicit = DB.createTransaction()) {
|
||||
update.usingTransaction(explicit);
|
||||
int rows = update.execute();
|
||||
assertThat(rows).isEqualTo(1);
|
||||
explicit.commit();
|
||||
}
|
||||
// rolling back the ambient transaction does not affect the update - it ran
|
||||
// against the explicit transaction which has already been committed above
|
||||
ambient.rollback();
|
||||
}
|
||||
|
||||
AuditLog reloaded = DB.find(AuditLog.class, log.getId());
|
||||
assertThat(reloaded.getDescription()).isEqualTo("explicit");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUsingTransaction_executeNow_explicitNonAmbientTransaction() {
|
||||
|
||||
AuditLog log = new AuditLog();
|
||||
log.setDescription("initial");
|
||||
DB.save(log);
|
||||
|
||||
SqlUpdate update = DB.sqlUpdate("update audit_log set description = ? where id = ?")
|
||||
.setParameter(1, "explicitNow")
|
||||
.setParameter(2, log.getId());
|
||||
|
||||
try (Transaction ambient = DB.beginTransaction()) {
|
||||
try (Transaction explicit = DB.createTransaction()) {
|
||||
update.usingTransaction(explicit);
|
||||
int rows = update.executeNow();
|
||||
assertThat(rows).isEqualTo(1);
|
||||
explicit.commit();
|
||||
}
|
||||
ambient.rollback();
|
||||
}
|
||||
|
||||
AuditLog reloaded = DB.find(AuditLog.class, log.getId());
|
||||
assertThat(reloaded.getDescription()).isEqualTo("explicitNow");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ mvn -T 4 clean package
|
||||
mvn -T 4 deploy -pl '!composites,!platforms' -Pcentral -DskipTests
|
||||
|
||||
## git commit, git tag, git push --tags
|
||||
git commit -am 'Version 18.4.0'
|
||||
git tag 18.4.0
|
||||
git commit -am 'Version 18.3.0'
|
||||
git tag 18.3.0
|
||||
git push --tags
|
||||
|
||||
### convert to javax
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>kotlin querybean generator</name>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -56,14 +56,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+14
-14
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,67 +16,67 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hsqldb</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlanywhere</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -19,8 +19,6 @@ public abstract class BaseDB2Platform extends DatabasePlatform {
|
||||
this.supportsNativeJavaTime = false;
|
||||
this.truncateTable = "truncate table %s reuse storage ignore delete triggers immediate";
|
||||
this.likeClauseRaw = "like ?";
|
||||
this.existsWithCaseWhen = true;
|
||||
this.existsFromClause = " from sysibm.sysdummy1";
|
||||
this.sqlLimiter = new AnsiSqlRowsLimiter();
|
||||
|
||||
this.dbIdentity.setSupportsGetGeneratedKeys(true);
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package io.ebean.platform.db2;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class DB2PlatformTest {
|
||||
|
||||
@Test
|
||||
void existsWithCaseWhen_trueForDB2() {
|
||||
DB2LuwPlatform platform = new DB2LuwPlatform();
|
||||
|
||||
assertTrue(platform.existsWithCaseWhen());
|
||||
assertEquals(" from sysibm.sysdummy1", platform.existsFromClause());
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>platforms</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ebean parent</name>
|
||||
@@ -41,7 +41,6 @@
|
||||
<properties>
|
||||
<jackson.version>2.22.0</jackson.version>
|
||||
<avaje-json-core.version>3.14</avaje-json-core.version>
|
||||
<avaje-jsonb.version>3.14</avaje-jsonb.version>
|
||||
<h2database.version>2.2.220</h2database.version>
|
||||
<ebean-persistence-api.version>3.2</ebean-persistence-api.version>
|
||||
<ebean-types.version>3.0</ebean-types.version>
|
||||
@@ -49,7 +48,7 @@
|
||||
<ebean-annotation.version>8.11</ebean-annotation.version>
|
||||
<ebean-ddl-runner.version>2.3</ebean-ddl-runner.version>
|
||||
<ebean-migration-auto.version>1.2</ebean-migration-auto.version>
|
||||
<ebean-migration.version>14.4.0</ebean-migration.version>
|
||||
<ebean-migration.version>14.3.0</ebean-migration.version>
|
||||
<ebean-test-containers.version>8.2</ebean-test-containers.version>
|
||||
<ebean-datasource.version>10.10</ebean-datasource.version>
|
||||
<ebean-agent.version>18.3.0</ebean-agent.version>
|
||||
@@ -99,7 +98,6 @@
|
||||
<module>platforms</module>
|
||||
<module>composites</module>
|
||||
<module>ebean-jackson-mapper</module>
|
||||
<module>ebean-avajejsonb-mapper</module>
|
||||
<module>ebean-spring-txn</module>
|
||||
<module>ebean-opentelemetry</module>
|
||||
<module>ebean-core-json</module>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<name>querybean generator</name>
|
||||
@@ -45,7 +45,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>tests</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>tests</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-kotlin</artifactId>
|
||||
@@ -40,7 +40,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -53,7 +53,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>18.4.0</version>
|
||||
<version>18.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user