mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-09-20 11:17:36 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad18b6573c | ||
|
|
11632c3a6e | ||
|
|
b066f9c072 | ||
|
|
1e38ed9efc | ||
|
|
2d48dd2fef | ||
|
|
60aa899a34 | ||
|
|
c38c75fdec | ||
|
|
cf275f4edd | ||
|
|
121f4afed8 | ||
|
|
c8621c3a29 | ||
|
|
f83da15d5e | ||
|
|
52729d9802 | ||
|
|
69c25309da | ||
|
|
723a12fd66 | ||
|
|
5cf74f1ee9 |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-net-postgis-types</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -47,19 +47,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -41,7 +41,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -60,13 +60,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
|
||||
+26
-26
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -89,25 +89,25 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -125,13 +125,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -155,37 +155,37 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- platforms -->
|
||||
@@ -193,79 +193,79 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-clickhouse</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-db2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-hana</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mariadb</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mysql</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-nuodb</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-oracle</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlite</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlserver</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+6
-6
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -46,7 +46,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -159,21 +159,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ public final class ScopeTrans {
|
||||
* Explicit set of Exceptions that DO cause a rollback to occur.
|
||||
*/
|
||||
private final ArrayList<Class<? extends Throwable>> rollbackFor;
|
||||
private Boolean restoreBatch;
|
||||
private Boolean restoreBatchOnCascade;
|
||||
private boolean restoreBatch;
|
||||
private boolean restoreBatchOnCascade;
|
||||
private int restoreBatchSize;
|
||||
private Boolean restoreBatchGeneratedKeys;
|
||||
private boolean restoreBatchFlushOnQuery;
|
||||
@@ -61,7 +61,7 @@ public final class ScopeTrans {
|
||||
this.noRollbackFor = txScope.getNoRollbackFor();
|
||||
this.rollbackFor = txScope.getRollbackFor();
|
||||
if (transaction != null) {
|
||||
if (!created && txScope.isBatchSet() || txScope.isBatchOnCascadeSet() || txScope.isBatchSizeSet()) {
|
||||
if (!created) {
|
||||
restoreBatch = transaction.isBatchMode();
|
||||
restoreBatchOnCascade = transaction.isBatchOnCascade();
|
||||
restoreBatchSize = transaction.getBatchSize();
|
||||
@@ -143,15 +143,9 @@ public final class ScopeTrans {
|
||||
} else {
|
||||
nestedCommit = true;
|
||||
transaction.setFlushOnQuery(restoreBatchFlushOnQuery);
|
||||
if (restoreBatch != null) {
|
||||
transaction.setBatchMode(restoreBatch);
|
||||
}
|
||||
if (restoreBatchOnCascade != null) {
|
||||
transaction.setBatchOnCascade(restoreBatchOnCascade);
|
||||
}
|
||||
if (restoreBatchSize > 0) {
|
||||
transaction.setBatchSize(restoreBatchSize);
|
||||
}
|
||||
transaction.setBatchMode(restoreBatch);
|
||||
transaction.setBatchOnCascade(restoreBatchOnCascade);
|
||||
transaction.setBatchSize(restoreBatchSize);
|
||||
if (restoreBatchGeneratedKeys != null) {
|
||||
transaction.setGetGeneratedKeys(restoreBatchGeneratedKeys);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,9 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
||||
BeanProperty[] others = target.propertiesBaseScalar();
|
||||
if (descriptor.isRawSqlBased()) {
|
||||
String dbColumn = owner.dbColumn();
|
||||
return new ImportedIdSimple(owner, dbColumn, null, idProp, 0);
|
||||
if (dbColumn != null) {
|
||||
return new ImportedIdSimple(owner, dbColumn, null, idProp, 0);
|
||||
}
|
||||
}
|
||||
if (idProp == null) {
|
||||
return null;
|
||||
|
||||
@@ -238,12 +238,14 @@ final class CQueryBuilder {
|
||||
query.setMaxRows(0);
|
||||
|
||||
boolean countDistinct = query.isDistinct();
|
||||
boolean useColumnAlias = selectCountWithColumnAlias;
|
||||
boolean withAgg = false;
|
||||
if (!countDistinct) {
|
||||
withAgg = includesAggregation(request, query);
|
||||
if (!withAgg) {
|
||||
// minimise select clause for standard count
|
||||
query.setSelectId();
|
||||
useColumnAlias = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +258,7 @@ final class CQueryBuilder {
|
||||
}
|
||||
|
||||
predicates.prepare(true);
|
||||
SqlTree sqlTree = createSqlTree(request, predicates, selectCountWithColumnAlias && withAgg);
|
||||
SqlTree sqlTree = createSqlTree(request, predicates, useColumnAlias);
|
||||
if (SpiQuery.TemporalMode.CURRENT == query.temporalMode()) {
|
||||
sqlTree.addSoftDeletePredicate(query);
|
||||
}
|
||||
|
||||
@@ -295,9 +295,8 @@ final class DefaultDbSqlContext implements DbSqlContext {
|
||||
if (useColumnAlias) {
|
||||
sb.append(' ');
|
||||
sb.append(columnAliasPrefix);
|
||||
sb.append(columnIndex);
|
||||
sb.append(columnIndex++);
|
||||
}
|
||||
columnIndex++;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,7 @@ public final class SqlTreeBuilder {
|
||||
private final boolean disableLazyLoad;
|
||||
private final boolean readOnly;
|
||||
private final SpiQuery.TemporalMode temporalMode;
|
||||
private SqlTreeNode rootNode;
|
||||
private final SqlTreeNode rootNode;
|
||||
private boolean sqlDistinct;
|
||||
private final boolean platformDistinctNoLobs;
|
||||
private final SqlTreeCommon common;
|
||||
@@ -73,6 +73,7 @@ public final class SqlTreeBuilder {
|
||||
this.alias = null;
|
||||
this.ctx = null;
|
||||
this.common = new SqlTreeCommon(temporalMode, disableLazyLoad, readOnly, null);
|
||||
this.rootNode = buildRootNode(desc);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,12 +101,13 @@ public final class SqlTreeBuilder {
|
||||
this.alias = new SqlTreeAlias(request.baseTableAlias(), temporalMode);
|
||||
this.distinctOnPlatform = builder.isPlatformDistinctOn();
|
||||
this.platformDistinctNoLobs = builder.isPlatformDistinctNoLobs();
|
||||
this.common = new SqlTreeCommon(temporalMode, disableLazyLoad, readOnly, includeJoin);
|
||||
this.rootNode = buildRootNode(desc);
|
||||
String fromForUpdate = builder.fromForUpdate(query);
|
||||
CQueryHistorySupport historySupport = builder.historySupport(query);
|
||||
CQueryDraftSupport draftSupport = builder.draftSupport(query);
|
||||
String colAlias = subQuery ? null : columnAliasPrefix;
|
||||
String colAlias = subQuery || rootNode.isSingleProperty() ? null : columnAliasPrefix;
|
||||
this.ctx = new DefaultDbSqlContext(alias, colAlias, historySupport, draftSupport, fromForUpdate);
|
||||
this.common = new SqlTreeCommon(temporalMode, disableLazyLoad, readOnly, includeJoin);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +115,6 @@ public final class SqlTreeBuilder {
|
||||
*/
|
||||
public SqlTree build() {
|
||||
// build the appropriate chain of SelectAdapter's
|
||||
buildRoot(desc);
|
||||
// build the actual String
|
||||
String distinctOn = null;
|
||||
String selectSql = null;
|
||||
@@ -214,8 +215,8 @@ public final class SqlTreeBuilder {
|
||||
return ctx.content();
|
||||
}
|
||||
|
||||
private void buildRoot(STreeType desc) {
|
||||
rootNode = buildSelectChain(null, null, desc, null);
|
||||
private SqlTreeNode buildRootNode(STreeType desc) {
|
||||
SqlTreeNode root = buildSelectChain(null, null, desc, null);
|
||||
if (!rawSql) {
|
||||
alias.addJoin(queryDetail.getFetchPaths(), desc);
|
||||
alias.addJoin(predicates.predicateIncludes(), desc);
|
||||
@@ -224,6 +225,7 @@ public final class SqlTreeBuilder {
|
||||
alias.buildAlias();
|
||||
predicates.parseTableAlias(alias);
|
||||
}
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean net postgis types</name>
|
||||
@@ -19,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis types</name>
|
||||
@@ -19,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
return _root;
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
/** Deprecated(forRemoval = true) */
|
||||
protected final R _filterMany(String expressions, Object... params) {
|
||||
expr().filterMany(_name, expressions, params);
|
||||
return _root;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.example.domain;
|
||||
|
||||
import jakarta.persistence.Embeddable;
|
||||
import jakarta.persistence.Embedded;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class MyInnerEmb {
|
||||
|
||||
@Embeddable
|
||||
public static class EmbAddr {
|
||||
final long streetNum;
|
||||
final String line1;
|
||||
|
||||
public EmbAddr(long streetNum, String line1) {
|
||||
this.streetNum = streetNum;
|
||||
this.line1 = line1;
|
||||
}
|
||||
}
|
||||
|
||||
@Id
|
||||
long id;
|
||||
String one;
|
||||
|
||||
@Embedded
|
||||
EmbAddr address;
|
||||
|
||||
public long id() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public MyInnerEmb id(long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String one() {
|
||||
return one;
|
||||
}
|
||||
|
||||
public MyInnerEmb one(String beanOne) {
|
||||
this.one = beanOne;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EmbAddr address() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public MyInnerEmb setAddress(EmbAddr address) {
|
||||
this.address = address;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -29,35 +29,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -33,20 +33,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -149,14 +149,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class Config {
|
||||
/**
|
||||
* Common optional docker parameters that we just transfer to docker properties.
|
||||
*/
|
||||
private static final String[] DOCKER_TEST_PARAMS = {"fastStartMode", "inMemory", "initSqlFile", "seedSqlFile", "adminUser", "adminPassword", "extraDb", "extraDb.dbName", "extraDb.username", "extraDb.password", "extraDb.extensions", "extraDb.initSqlFile", "extraDb.seedSqlFile"};
|
||||
private static final String[] DOCKER_TEST_PARAMS = {"fastStartMode", "inMemory", "initSqlFile", "seedSqlFile", "adminUser", "adminPassword", "extraDb", "extraDb.dbName", "extraDb.username", "extraDb.password", "extraDb.extensions", "extraDb.initSqlFile", "extraDb.seedSqlFile", "createOptions", "configOptions"};
|
||||
private static final String[] DOCKER_PLATFORM_PARAMS = {"containerName", "image", "internalPort", "startMode", "shutdownMode", "maxReadyAttempts", "tmpfs", "collation", "characterSet"};
|
||||
|
||||
private static final String DDL_MODE_OPTIONS = "dropCreate, create, none, migration, createOnly or migrationDropCreate";
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package org.tests.model.basic;
|
||||
|
||||
import io.ebean.annotation.Sql;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.OneToOne;
|
||||
import org.tests.model.composite.CkeUser;
|
||||
|
||||
@Entity
|
||||
@Sql
|
||||
public class OtherAggregate {
|
||||
|
||||
@OneToOne
|
||||
CkeUser user;
|
||||
|
||||
int totalContacts;
|
||||
|
||||
public CkeUser getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(CkeUser user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public int getTotalContacts() {
|
||||
return totalContacts;
|
||||
}
|
||||
|
||||
public void setTotalContacts(int totalContacts) {
|
||||
this.totalContacts = totalContacts;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.tests.model.rawsql;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.RawSql;
|
||||
import io.ebean.RawSqlBuilder;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.OtherAggregate;
|
||||
import org.tests.model.composite.CkeUser;
|
||||
import org.tests.model.composite.CkeUserKey;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class TestRawSqlAssocOneComplexId extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
CkeUser user0 = new CkeUser();
|
||||
user0.setUserPK(new CkeUserKey(89, "OneToOne"));
|
||||
user0.setName("Other");
|
||||
DB.save(user0);
|
||||
|
||||
String sql =
|
||||
"select username, cod_cpny, name, 42 as totalContacts \n" +
|
||||
"from cke_user where username = ? and cod_cpny = ?";
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse(sql)
|
||||
.columnMapping("username", "user.userPK.username")
|
||||
.columnMapping("cod_cpny", "user.userPK.codCompany")
|
||||
.columnMapping("name", "user.name")
|
||||
.create();
|
||||
|
||||
List<OtherAggregate> l0 =
|
||||
DB.find(OtherAggregate.class)
|
||||
.setRawSql(rawSql)
|
||||
.setParameters("OneToOne", 89)
|
||||
.findList();
|
||||
|
||||
assertThat(l0).hasSize(1);
|
||||
OtherAggregate other = l0.get(0);
|
||||
|
||||
assertThat(other.getTotalContacts()).isEqualTo(42);
|
||||
assertThat(other.getUser()).isNotNull();
|
||||
assertThat(other.getUser().getUserPK().getUsername()).isEqualTo("OneToOne");
|
||||
assertThat(other.getUser().getUserPK().getCodCompany()).isEqualTo(89);
|
||||
assertThat(other.getUser().getName()).isEqualTo("Other");
|
||||
|
||||
DB.delete(user0);
|
||||
}
|
||||
}
|
||||
@@ -14,10 +14,10 @@ import java.util.List;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class TestRowCount extends BaseTestCase {
|
||||
class TestRowCount extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
void test() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
LoggedSql.start();
|
||||
@@ -46,7 +46,7 @@ public class TestRowCount extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void find_count_distinct_singleProperty() {
|
||||
void find_count_distinct_singleProperty() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
Query<Customer> query = DB.find(Customer.class)
|
||||
@@ -57,13 +57,13 @@ public class TestRowCount extends BaseTestCase {
|
||||
|
||||
int count = query.findCount();
|
||||
|
||||
assertThat(sqlOf(query)).contains("select count(distinct t0.anniversary) from o_customer t0 where t0.status = ?");
|
||||
// never see column alias used with count distinct on single column
|
||||
assertThat(query.getGeneratedSql()).contains("select count(distinct t0.anniversary) from o_customer t0 where t0.status = ?");
|
||||
assertThat(count).isGreaterThan(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void find_count_distinct_multipleProperties() {
|
||||
|
||||
void find_count_distinct_multipleProperties() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
Query<Customer> query = DB.find(Customer.class)
|
||||
@@ -72,7 +72,32 @@ public class TestRowCount extends BaseTestCase {
|
||||
|
||||
int count = query.findCount();
|
||||
|
||||
assertThat(sqlOf(query)).contains("select count(*) from ( select distinct t0.anniversary, t0.status from o_customer t0)");
|
||||
if (isSqlServer() || isH2() || isMariaDB() || isMySql()) {
|
||||
assertThat(query.getGeneratedSql()).contains("select count(*) from ( select distinct t0.anniversary c0, t0.status c1 from o_customer t0)");
|
||||
} else {
|
||||
assertThat(query.getGeneratedSql()).contains("select count(*) from ( select distinct t0.anniversary, t0.status from o_customer t0)");
|
||||
}
|
||||
assertThat(count).isGreaterThan(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
void find_count_distinct_multiplePropertiesSameColumn() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
Query<Customer> query = DB.find(Customer.class)
|
||||
.setDistinct(true)
|
||||
.select("id, anniversary, status")
|
||||
.fetch("billingAddress", "id, city")
|
||||
.fetch("shippingAddress", "id, city");
|
||||
|
||||
int count = query.findCount();
|
||||
|
||||
if (isSqlServer() || isH2() || isMariaDB() || isMySql()) {
|
||||
// must use column alias
|
||||
assertThat(query.getGeneratedSql()).contains("select count(*) from ( select distinct t0.anniversary c0, t0.status c1, t1.id c2, t1.city c3, t2.id c4, t2.city c5 from o_customer t0 left join o_address t1 on t1.id = t0.billing_address_id left join o_address t2 on t2.id = t0.shipping_address_id)");
|
||||
} else {
|
||||
assertThat(query.getGeneratedSql()).contains("select count(*) from ( select distinct t0.anniversary, t0.status, t1.id, t1.city, t2.id, t2.city from o_customer t0 left join o_address t1 on t1.id = t0.billing_address_id left join o_address t2 on t2.id = t0.shipping_address_id)");
|
||||
}
|
||||
assertThat(count).isGreaterThan(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.tests.transaction;
|
||||
|
||||
import io.ebean.TxScope;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Transaction;
|
||||
@@ -235,4 +236,19 @@ public class TestNestedTransaction extends BaseTestCase {
|
||||
}
|
||||
assertModified();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_txn_with_BatchMode() {
|
||||
|
||||
try (Transaction txn1 = DB.beginTransaction(TxScope.requiresNew())) {
|
||||
|
||||
try (Transaction txn2 = DB.beginTransaction()) {
|
||||
txn2.setBatchMode(true);
|
||||
txn2.commit();
|
||||
}
|
||||
// resume txn1
|
||||
assertThat(txn1.isBatchMode()).isFalse();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ mvn -T 4 clean package
|
||||
mvn -T 4 deploy -pl '!composites,!platforms' -Pcentral -DskipTests -DskipStagingRepositoryClose=true -DstagingProgressTimeoutMinutes=9
|
||||
|
||||
## git commit, git tag, git push --tags
|
||||
git commit -am 'Version 14.8.1'
|
||||
git tag 14.8.1
|
||||
git commit -am 'Version 14.8.2'
|
||||
git tag 14.8.2
|
||||
git push --tags
|
||||
|
||||
## convert to javax
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>kotlin querybean generator</name>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -56,14 +56,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+2
-4
@@ -11,6 +11,8 @@ interface Constants {
|
||||
String ENTITY = "jakarta.persistence.Entity";
|
||||
String EMBEDDABLE = "jakarta.persistence.Embeddable";
|
||||
String CONVERTER = "jakarta.persistence.Converter";
|
||||
String ONE_TO_MANY = "jakarta.persistence.OneToMany";
|
||||
String MANY_TO_MANY = "jakarta.persistence.ManyToMany";
|
||||
String EBEAN_COMPONENT = "io.ebean.annotation.EbeanComponent";
|
||||
|
||||
String DBARRAY = "io.ebean.annotation.DbArray";
|
||||
@@ -18,10 +20,6 @@ interface Constants {
|
||||
String DBJSONB = "io.ebean.annotation.DbJsonB";
|
||||
String DBNAME = "io.ebean.annotation.DbName";
|
||||
|
||||
String TQASSOC = "io.ebean.typequery.TQAssoc";
|
||||
String TQASSOCBEAN = "io.ebean.typequery.TQAssocBean";
|
||||
String TQPROPERTY = "io.ebean.typequery.TQProperty";
|
||||
|
||||
String MODULEINFO = "io.ebean.config.ModuleInfo";
|
||||
String METAINF_MANIFEST = "META-INF/ebean-generated-info.mf";
|
||||
String METAINF_SERVICES_MODULELOADER = "META-INF/services/io.ebean.config.EntityClassRegister";
|
||||
|
||||
+14
-64
@@ -1,9 +1,8 @@
|
||||
package io.ebean.querybean.generator;
|
||||
|
||||
class KotlinLangAdapter implements LangAdapter {
|
||||
final class KotlinLangAdapter {
|
||||
|
||||
@Override
|
||||
public void alias(Append writer, String shortName, String fullName) {
|
||||
void alias(Append writer, String shortName, String fullName) {
|
||||
writer.append(" companion object {").eol();
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * shared 'Alias' instance used to provide").eol();
|
||||
@@ -20,87 +19,38 @@ class KotlinLangAdapter implements LangAdapter {
|
||||
writer.append(" }").eol().eol();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void assocBeanConstructor(Append writer, String shortName) {
|
||||
writer.append(" constructor(name: String, root: R) : super(name, root)").eol();
|
||||
writer.eol();
|
||||
writer.append(" constructor(name: String, root: R, prefix: String) : super(name, root, prefix)").eol();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fetch(Append writer, String origShortName) {
|
||||
writeAssocBeanFetch(writer, origShortName, "", "Eagerly fetch this association loading the specified properties.");
|
||||
writeAssocBeanFetch(writer, origShortName, "Query", "Eagerly fetch this association using a 'query join' loading the specified properties.");
|
||||
writeAssocBeanFetch(writer, origShortName, "Cache", "Eagerly fetch this association using L2 cache.");
|
||||
writeAssocBeanFetch(writer, origShortName, "Lazy", "Use lazy loading for this association loading the specified properties.");
|
||||
}
|
||||
|
||||
private void writeAssocBeanFetch(Append writer, String origShortName, String fetchType, String comment) {
|
||||
// fun fetch(vararg properties: TQProperty<QContact,?>): R {
|
||||
// return fetchProperties(*properties)
|
||||
// }
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * ").append(comment).eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(" fun fetch%s(vararg properties: TQProperty<Q%s,Any>) : R {", fetchType, origShortName).eol();
|
||||
writer.append(" return fetch%sProperties(*properties)", fetchType).eol();
|
||||
writer.append(" }").eol();
|
||||
writer.eol();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rootBeanConstructor(Append writer, String shortName, String dbName, String fullName) {
|
||||
void rootBeanConstructor(Append writer, String shortName, String dbName, String fullName) {
|
||||
String name = (dbName == null) ? "default" : dbName;
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * Construct using the %s Database.", name).eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(" /** Construct using the %s Database. */", name).eol();
|
||||
if (dbName == null) {
|
||||
writer.append(" constructor() : super(%s::class.java)", fullName).eol().eol();
|
||||
} else {
|
||||
writer.append(" constructor() : super(%s::class.java, io.ebean.DB.byName(\"%s\"))", fullName, dbName).eol().eol();
|
||||
}
|
||||
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * @deprecated migrate to query.usingTransaction()", name).eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(" @Deprecated(message=\"migrate to query.usingTransaction()\")").eol();
|
||||
writer.append(" /** @deprecated migrate to query.usingTransaction() */", name).eol();
|
||||
writer.append(" @Deprecated(message=\"migrate to query.usingTransaction()\")").eol();
|
||||
if (dbName == null) {
|
||||
writer.append(" constructor(transaction: io.ebean.Transaction) : super(%s::class.java, transaction)", fullName).eol().eol();
|
||||
} else {
|
||||
writer.append(" constructor(transaction: io.ebean.Transaction) : super(%s::class.java, io.ebean.DB.byName(\"%s\"), transaction)", fullName, dbName).eol().eol();
|
||||
}
|
||||
|
||||
writer.eol();
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * Construct with a given Database.").eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(" /** Construct with a given Database. */").eol();
|
||||
writer.append(" constructor(database: io.ebean.Database) : super(%s::class.java, database)", fullName).eol().eol();
|
||||
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * Construct for Alias.").eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(" /** Construct for Alias. */").eol();
|
||||
writer.append(" private constructor(dummy: Boolean) : super(dummy)").eol().eol();
|
||||
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * Private constructor for FetchGroup building.").eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(" private constructor(fetchGroupQuery: io.ebean.Query<%s>) : super(fetchGroupQuery)", fullName).eol();
|
||||
writer.append(" /** Private constructor for FetchGroup building. */").eol();
|
||||
writer.append(" private constructor(fetchGroupQuery: io.ebean.Query<%s>) : super(fetchGroupQuery)", fullName).eol().eol();
|
||||
|
||||
writer.append(" /** Private constructor for filterMany */").eol();
|
||||
writer.append(" private constructor(filter: io.ebean.ExpressionList<%s>) : super(filter)", fullName).eol().eol();
|
||||
|
||||
writer.eol();
|
||||
writer.append(" /** Return a copy of the query. */").eol();
|
||||
writer.append(" override fun copy() : Q%s {", shortName).eol();
|
||||
writer.append(" return Q%s(query().copy())", shortName).eol();
|
||||
writer.append(" }").eol();
|
||||
writer.eol();
|
||||
writer.append(" }").eol().eol();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fieldDefn(Append writer, String propertyName, String typeDefn) {
|
||||
writer.append(" lateinit var %s: ", propertyName);
|
||||
if (typeDefn.endsWith(",Integer>")) {
|
||||
typeDefn = typeDefn.replace(",Integer>", ",Int>");
|
||||
}
|
||||
writer.append(typeDefn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package io.ebean.querybean.generator;
|
||||
|
||||
public interface LangAdapter {
|
||||
|
||||
|
||||
void alias(Append writer, String shortName, String beanFullName);
|
||||
|
||||
void rootBeanConstructor(Append writer, String shortName, String dbName, String beanFullName);
|
||||
|
||||
void assocBeanConstructor(Append writer, String shortName);
|
||||
|
||||
void fetch(Append writer, String origShortName);
|
||||
|
||||
void fieldDefn(Append writer, String propertyName, String typeDefn);
|
||||
|
||||
}
|
||||
+57
-30
@@ -239,6 +239,10 @@ class ProcessingContext implements Constants {
|
||||
return hasAnnotations(element, EMBEDDABLE);
|
||||
}
|
||||
|
||||
private static boolean dbToMany(Element field) {
|
||||
return hasAnnotations(field, ONE_TO_MANY, MANY_TO_MANY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the DbName annotation and return name if found.
|
||||
*/
|
||||
@@ -261,6 +265,7 @@ class ProcessingContext implements Constants {
|
||||
}
|
||||
|
||||
PropertyType getPropertyType(VariableElement field) {
|
||||
boolean toMany = dbToMany(field);
|
||||
if (dbJsonField(field)) {
|
||||
return propertyTypeMap.getDbJsonType();
|
||||
}
|
||||
@@ -301,36 +306,30 @@ class ProcessingContext implements Constants {
|
||||
if (targetEntity != null) {
|
||||
final TypeElement element = elementUtils.getTypeElement(targetEntity);
|
||||
if (isEntityOrEmbedded(element)) {
|
||||
return createPropertyTypeAssoc(typeDef(element.asType()));
|
||||
boolean embeddable = isEmbeddable(element);
|
||||
return createPropertyTypeAssoc(embeddable, toMany, typeDef(element.asType()));
|
||||
}
|
||||
}
|
||||
if (isEntityOrEmbedded(fieldType)) {
|
||||
// public QAssocContact<QCustomer> contacts;
|
||||
return createPropertyTypeAssoc(typeDef(typeMirror));
|
||||
boolean embeddable = isEmbeddable(fieldType);
|
||||
return createPropertyTypeAssoc(embeddable, toMany, typeDef(typeMirror));
|
||||
}
|
||||
|
||||
final PropertyType result;
|
||||
if (typeMirror.getKind() == TypeKind.DECLARED) {
|
||||
DeclaredType declaredType = (DeclaredType) typeMirror;
|
||||
List<? extends TypeMirror> typeArguments = declaredType.getTypeArguments();
|
||||
if (typeArguments.size() == 1) {
|
||||
TypeMirror argType = typeArguments.get(0);
|
||||
Element argElement = asElement(argType);
|
||||
if (isEntityOrEmbedded(argElement)) {
|
||||
return createPropertyTypeAssoc(typeDef(argElement.asType()));
|
||||
}
|
||||
} else if (typeArguments.size() == 2) {
|
||||
TypeMirror argType = typeArguments.get(1);
|
||||
Element argElement = asElement(argType);
|
||||
if (isEntityOrEmbedded(argElement)) {
|
||||
return createPropertyTypeAssoc(typeDef(argElement.asType()));
|
||||
}
|
||||
}
|
||||
result = createManyTypeAssoc(field, (DeclaredType) typeMirror);
|
||||
} else {
|
||||
result = null;
|
||||
}
|
||||
|
||||
if (typeInstanceOf(typeMirror, "java.lang.Comparable")) {
|
||||
return new PropertyTypeScalarComparable(trimAnnotations(typeMirror.toString()));
|
||||
if (result != null) {
|
||||
return result;
|
||||
} else {
|
||||
return new PropertyTypeScalar(trimAnnotations(typeMirror.toString()));
|
||||
if (typeInstanceOf(typeMirror, "java.lang.Comparable")) {
|
||||
return new PropertyTypeScalarComparable(trimAnnotations(typeMirror.toString()));
|
||||
} else {
|
||||
return new PropertyTypeScalar(trimAnnotations(typeMirror.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,6 +356,25 @@ class ProcessingContext implements Constants {
|
||||
.anyMatch(t -> typeInstanceOf(t, desiredInterface));
|
||||
}
|
||||
|
||||
private PropertyType createManyTypeAssoc(VariableElement field, DeclaredType declaredType) {
|
||||
boolean toMany = dbToMany(field);
|
||||
List<? extends TypeMirror> typeArguments = declaredType.getTypeArguments();
|
||||
if (typeArguments.size() == 1) {
|
||||
Element argElement = typeUtils.asElement(typeArguments.get(0));
|
||||
if (isEntityOrEmbedded(argElement)) {
|
||||
boolean embeddable = isEmbeddable(argElement);
|
||||
return createPropertyTypeAssoc(embeddable, toMany, typeDef(argElement.asType()));
|
||||
}
|
||||
} else if (typeArguments.size() == 2) {
|
||||
Element argElement = typeUtils.asElement(typeArguments.get(1));
|
||||
if (isEntityOrEmbedded(argElement)) {
|
||||
boolean embeddable = isEmbeddable(argElement);
|
||||
return createPropertyTypeAssoc(embeddable, toMany, typeDef(argElement.asType()));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String readTargetEntity(Element declaredType) {
|
||||
for (AnnotationMirror annotation : declaredType.getAnnotationMirrors()) {
|
||||
final Object targetEntity = readTargetEntityFromAnnotation(annotation);
|
||||
@@ -386,11 +404,20 @@ class ProcessingContext implements Constants {
|
||||
/**
|
||||
* Create the QAssoc PropertyType.
|
||||
*/
|
||||
private PropertyType createPropertyTypeAssoc(String fullName) {
|
||||
String[] split = Split.split(fullName);
|
||||
String propertyName = "QAssoc" + split[1];
|
||||
String packageName = packageAppend(split[0]);
|
||||
return new PropertyTypeAssoc(propertyName, packageName);
|
||||
private PropertyType createPropertyTypeAssoc(boolean embeddable, boolean toMany, String fullName) {
|
||||
TypeElement typeElement = elementUtils.getTypeElement(fullName);
|
||||
String type;
|
||||
if (typeElement.getNestingKind().isNested()) {
|
||||
type = typeElement.getEnclosingElement().toString() + "$" + typeElement.getSimpleName();
|
||||
} else {
|
||||
type = typeElement.getQualifiedName().toString();
|
||||
}
|
||||
|
||||
String suffix = toMany ? "Many" : embeddable ? "": "One";
|
||||
String[] split = Split.split(type);
|
||||
String propertyName = "Q" + split[1] + ".Assoc" + suffix;
|
||||
String importName = split[0] + ".query.Q" + split[1];
|
||||
return new PropertyTypeAssoc(propertyName, importName);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -415,9 +442,10 @@ class ProcessingContext implements Constants {
|
||||
messager.printMessage(Diagnostic.Kind.ERROR, String.format(msg, args), e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a info message.
|
||||
*/
|
||||
void logWarn(String msg, Object... args) {
|
||||
messager.printMessage(Diagnostic.Kind.WARNING, String.format(msg, args));
|
||||
}
|
||||
|
||||
void logNote(String msg, Object... args) {
|
||||
messager.printMessage(Diagnostic.Kind.NOTE, String.format(msg, args));
|
||||
}
|
||||
@@ -559,7 +587,6 @@ class ProcessingContext implements Constants {
|
||||
} catch (FilerException e) {
|
||||
logNote(null, "FilerException reading services file: " + e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logError(null, "Error reading services file: " + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
|
||||
+5
-22
@@ -1,6 +1,7 @@
|
||||
package io.ebean.querybean.generator;
|
||||
|
||||
import javax.annotation.processing.AbstractProcessor;
|
||||
import javax.annotation.processing.FilerException;
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import javax.annotation.processing.RoundEnvironment;
|
||||
import javax.lang.model.SourceVersion;
|
||||
@@ -19,14 +20,12 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
private static final String KAPT_KOTLIN_GENERATED_OPTION = "kapt.kotlin.generated";
|
||||
|
||||
private ProcessingContext processingContext;
|
||||
private SimpleModuleInfoWriter moduleWriter;
|
||||
|
||||
public Processor() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getSupportedOptions() {
|
||||
|
||||
Set<String> options = new LinkedHashSet<>();
|
||||
options.add(KAPT_KOTLIN_GENERATED_OPTION);
|
||||
options.add(GENERATE_KOTLIN_CODE_OPTION);
|
||||
@@ -61,7 +60,6 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
int count = processEntities(roundEnv);
|
||||
processOthers(roundEnv);
|
||||
final int loaded = processingContext.complete();
|
||||
initModuleInfoBean();
|
||||
if (roundEnv.processingOver()) {
|
||||
writeModuleInfoBean();
|
||||
}
|
||||
@@ -98,26 +96,12 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
}
|
||||
}
|
||||
|
||||
private void initModuleInfoBean() {
|
||||
try {
|
||||
if (moduleWriter == null) {
|
||||
moduleWriter = new SimpleModuleInfoWriter(processingContext);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to initialise EntityClassRegister error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeModuleInfoBean() {
|
||||
try {
|
||||
if (moduleWriter == null) {
|
||||
processingContext.logError(null, "EntityClassRegister was not initialised and not written");
|
||||
} else {
|
||||
moduleWriter.write();
|
||||
}
|
||||
new SimpleModuleInfoWriter(processingContext).write();
|
||||
} catch (FilerException e) {
|
||||
processingContext.logWarn(null, "FilerException trying to write EntityClassRegister: " + e);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to write EntityClassRegister error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
}
|
||||
}
|
||||
@@ -125,8 +109,7 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
private void generateQueryBeans(Element element) {
|
||||
try {
|
||||
SimpleQueryBeanWriter beanWriter = new SimpleQueryBeanWriter((TypeElement) element, processingContext);
|
||||
beanWriter.writeRootBean();
|
||||
beanWriter.writeAssocBean();
|
||||
beanWriter.writeBean();
|
||||
} catch (Throwable e) {
|
||||
processingContext.logError(element, "Error generating query beans: " + e);
|
||||
}
|
||||
|
||||
+4
-13
@@ -7,25 +7,16 @@ import java.util.Set;
|
||||
*/
|
||||
class PropertyTypeAssoc extends PropertyType {
|
||||
|
||||
/**
|
||||
* The package name for this associated query bean.
|
||||
*/
|
||||
private final String assocPackage;
|
||||
private final String importName;
|
||||
|
||||
/**
|
||||
* Construct given the associated bean type name and package.
|
||||
*
|
||||
* @param qAssocTypeName the associated bean type name.
|
||||
* @param assocPackage the associated bean package.
|
||||
*/
|
||||
PropertyTypeAssoc(String qAssocTypeName, String assocPackage) {
|
||||
PropertyTypeAssoc(String qAssocTypeName, String importName) {
|
||||
super(qAssocTypeName);
|
||||
this.assocPackage = assocPackage;
|
||||
this.importName = importName;
|
||||
}
|
||||
|
||||
@Override
|
||||
void addImports(Set<String> allImports) {
|
||||
allImports.add(assocPackage + "." + propertyType);
|
||||
allImports.add(importName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-2
@@ -50,7 +50,6 @@ class SimpleModuleInfoWriter {
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to write services file " + e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -70,7 +69,6 @@ class SimpleModuleInfoWriter {
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to write services file " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
+87
-123
@@ -12,7 +12,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
@@ -74,19 +73,17 @@ class SimpleQueryBeanWriter {
|
||||
private final boolean embeddable;
|
||||
private final String dbName;
|
||||
private final String beanFullName;
|
||||
private final LangAdapter langAdapter;
|
||||
private boolean writingAssocBean;
|
||||
private final KotlinLangAdapter langAdapter = new KotlinLangAdapter();
|
||||
private boolean writingEmbeddedBean;
|
||||
private final String generatedSourcesDir;
|
||||
|
||||
private String destPackage;
|
||||
private String origDestPackage;
|
||||
private String shortName;
|
||||
private final String shortInnerName;
|
||||
private final String origShortName;
|
||||
private Append writer;
|
||||
|
||||
SimpleQueryBeanWriter(TypeElement element, ProcessingContext processingContext) {
|
||||
this.langAdapter = new KotlinLangAdapter();
|
||||
this.generatedSourcesDir = processingContext.generatedSourcesDir();
|
||||
this.element = element;
|
||||
this.processingContext = processingContext;
|
||||
@@ -95,7 +92,7 @@ class SimpleQueryBeanWriter {
|
||||
this.destPackage = Util.packageOf(nested, beanFullName) + ".query";
|
||||
String sn = Util.shortName(nested, beanFullName);
|
||||
this.shortInnerName = Util.shortName(false, sn);
|
||||
this.shortName = sn.replace(".", "");
|
||||
this.shortName = sn.replace(".", "_"); // $ not supported with Kotlin, see kotlinInnerType()
|
||||
this.origShortName = shortName;
|
||||
this.isEntity = processingContext.isEntity(element);
|
||||
this.embeddable = processingContext.isEmbeddable(element);
|
||||
@@ -118,8 +115,8 @@ class SimpleQueryBeanWriter {
|
||||
return processingContext.findDbName(element);
|
||||
}
|
||||
|
||||
private LangAdapter lang() {
|
||||
return langAdapter;
|
||||
private static String kotlinInnerType(String fullType) {
|
||||
return fullType.replace('$', '_');
|
||||
}
|
||||
|
||||
private void gatherPropertyDetails() {
|
||||
@@ -148,25 +145,24 @@ class SimpleQueryBeanWriter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the type query bean (root bean).
|
||||
* Write the type query bean.
|
||||
*/
|
||||
void writeRootBean() throws IOException {
|
||||
void writeBean() throws IOException {
|
||||
gatherPropertyDetails();
|
||||
translateKotlinImportTypes();
|
||||
if (isEmbeddable()) {
|
||||
processingContext.addEntity(beanFullName, dbName);
|
||||
writeEmbeddedBean();
|
||||
} else if (isEntity()) {
|
||||
processingContext.addEntity(beanFullName, dbName);
|
||||
writer = new Append(createFileWriter());
|
||||
|
||||
translateKotlinImportTypes();
|
||||
|
||||
writePackage();
|
||||
writeImports();
|
||||
writeClass();
|
||||
writeAlias();
|
||||
writeFields();
|
||||
writeFields(false);
|
||||
writeConstructors();
|
||||
//writeStaticAliasClass();
|
||||
writeClassEnd();
|
||||
|
||||
writer.close();
|
||||
@@ -196,139 +192,53 @@ class SimpleQueryBeanWriter {
|
||||
/**
|
||||
* Write the type query assoc bean.
|
||||
*/
|
||||
void writeAssocBean() throws IOException {
|
||||
writingAssocBean = true;
|
||||
origDestPackage = destPackage;
|
||||
destPackage = destPackage + ".assoc";
|
||||
shortName = "Assoc" + shortName;
|
||||
void writeEmbeddedBean() throws IOException {
|
||||
writingEmbeddedBean = true;
|
||||
|
||||
prepareAssocBeanImports();
|
||||
writer = new Append(createFileWriter());
|
||||
|
||||
writePackage();
|
||||
writeImports();
|
||||
writeClass();
|
||||
writeFields();
|
||||
writeConstructors();
|
||||
writeEmbeddedAssoc();
|
||||
writeClassEnd();
|
||||
|
||||
writer.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare the imports for writing assoc bean.
|
||||
*/
|
||||
private void prepareAssocBeanImports() {
|
||||
if (embeddable) {
|
||||
importTypes.add(Constants.TQASSOC);
|
||||
} else {
|
||||
importTypes.add(Constants.TQASSOCBEAN);
|
||||
}
|
||||
if (isEntity()) {
|
||||
importTypes.add(Constants.TQPROPERTY);
|
||||
importTypes.add(origDestPackage + ".Q" + origShortName);
|
||||
//if (implementsInterface != null) {
|
||||
// importTypes.add(Constants.AVAJE_LANG_NULLABLE);
|
||||
// importTypes.add(Constants.JAVA_COLLECTION);
|
||||
// importTypes.add(implementsInterfaceFullName);
|
||||
//}
|
||||
}
|
||||
|
||||
// remove imports for the same package
|
||||
Iterator<String> importsIterator = importTypes.iterator();
|
||||
String checkImportStart = destPackage + ".QAssoc";
|
||||
while (importsIterator.hasNext()) {
|
||||
String importType = importsIterator.next();
|
||||
if (importType.startsWith(checkImportStart)) {
|
||||
importsIterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write constructors.
|
||||
*/
|
||||
private void writeConstructors() {
|
||||
if (writingAssocBean) {
|
||||
writeAssocBeanFetch();
|
||||
writeAssocBeanConstructor();
|
||||
} else {
|
||||
writeRootBeanConstructor();
|
||||
}
|
||||
langAdapter.rootBeanConstructor(writer, shortName, dbName, beanFullName);
|
||||
writeAssocClasses();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the constructors for 'root' type query bean.
|
||||
*/
|
||||
private void writeRootBeanConstructor() {
|
||||
lang().rootBeanConstructor(writer, shortName, dbName, beanFullName);
|
||||
}
|
||||
|
||||
private void writeAssocBeanFetch() {
|
||||
if (isEntity()) {
|
||||
//if (implementsInterface != null) {
|
||||
// writeAssocBeanExpression(false, "eq", "Is equal to by ID property.");
|
||||
// writeAssocBeanExpression(true, "eqIfPresent", "Is equal to by ID property if the value is not null, if null no expression is added.");
|
||||
// writeAssocBeanExpression(false, "in", "IN the given values.", implementsInterfaceShortName + "...", "in");
|
||||
// writeAssocBeanExpression(false, "inBy", "IN the given interface values.", "Collection<" + implementsInterfaceShortName + ">", "in");
|
||||
// writeAssocBeanExpression(true, "inOrEmptyBy", "IN the given interface values if the collection is not empty. No expression is added if the collection is empty..", "Collection<" + implementsInterfaceShortName + ">", "inOrEmpty");
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
private void writeAssocBeanExpression(boolean nullable,String expression, String comment) {
|
||||
writeAssocBeanExpression(nullable, expression, comment, implementsInterfaceShortName, expression);
|
||||
}
|
||||
|
||||
private void writeAssocBeanExpression(boolean nullable, String expression, String comment, String param, String actualExpression) {
|
||||
final String nullableAnnotation = nullable ? "@Nullable " : "";
|
||||
String values = expression.startsWith("in") ? "values" : "value";
|
||||
writer.append(" /**").eol();
|
||||
writer.append(" * ").append(comment).eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(" fun %s(%s%s %s): R {", expression, nullableAnnotation, param, values).eol();
|
||||
writer.append(" expr().%s(_name, %s);", actualExpression, values).eol();
|
||||
writer.append(" return _root;").eol();
|
||||
writer.append(" }").eol();
|
||||
writer.eol();
|
||||
}
|
||||
|
||||
/**
|
||||
* Write constructor for 'assoc' type query bean.
|
||||
*/
|
||||
private void writeAssocBeanConstructor() {
|
||||
lang().assocBeanConstructor(writer, shortName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write all the fields.
|
||||
*/
|
||||
private void writeFields() {
|
||||
private void writeFields(boolean assocBeans) {
|
||||
String padding = assocBeans ? " " : "";
|
||||
for (PropertyMeta property : properties) {
|
||||
String typeDefn = property.getTypeDefn(shortName, writingAssocBean);
|
||||
lang().fieldDefn(writer, property.getName(), typeDefn);
|
||||
writer.eol();
|
||||
String typeDefn = kotlinTypeDefn(property.getTypeDefn(shortName, assocBeans));
|
||||
writer.append("%s lateinit var %s: %s", padding, property.getName(), kotlinInnerType(typeDefn)).eol();
|
||||
}
|
||||
writer.eol();
|
||||
}
|
||||
|
||||
private static String kotlinTypeDefn(String type) {
|
||||
if (type.endsWith(",Integer>")) {
|
||||
return type.replace(",Integer>", ",Int>");
|
||||
} else {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the class definition.
|
||||
*/
|
||||
private void writeClass() {
|
||||
if (writingAssocBean) {
|
||||
if (writingEmbeddedBean) {
|
||||
writer.append("/**").eol();
|
||||
writer.append(" * Association query bean for %s.", shortName).eol();
|
||||
writer.append(" * ").eol();
|
||||
writer.append(" * THIS IS A GENERATED OBJECT, DO NOT MODIFY THIS CLASS.").eol();
|
||||
writer.append(" */").eol();
|
||||
writer.append(Constants.AT_GENERATED).eol();
|
||||
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
|
||||
if (embeddable) {
|
||||
writer.append("class Q%s<R> : TQAssoc<%s,R> {", shortName, beanFullName).eol();
|
||||
} else {
|
||||
writer.append("class Q%s<R> : TQAssocBean<%s,R,Q%s> {", shortName, beanFullName, origShortName).eol();
|
||||
}
|
||||
writer.append("class Q%s {", shortName).eol();
|
||||
} else {
|
||||
writer.append("/**").eol();
|
||||
writer.append(" * Query bean for %s.", shortName).eol();
|
||||
@@ -344,9 +254,7 @@ class SimpleQueryBeanWriter {
|
||||
}
|
||||
|
||||
private void writeAlias() {
|
||||
if (!writingAssocBean) {
|
||||
lang().alias(writer, shortName, beanFullName);
|
||||
}
|
||||
langAdapter.alias(writer, shortName, beanFullName);
|
||||
}
|
||||
|
||||
private void writeClassEnd() {
|
||||
@@ -358,7 +266,7 @@ class SimpleQueryBeanWriter {
|
||||
*/
|
||||
private void writeImports() {
|
||||
for (String importType : importTypes) {
|
||||
writer.append("import %s;", importType).eol();
|
||||
writer.append("import %s;", kotlinInnerType(importType)).eol();
|
||||
}
|
||||
writer.eol();
|
||||
}
|
||||
@@ -379,4 +287,60 @@ class SimpleQueryBeanWriter {
|
||||
return new FileWriter(absFile);
|
||||
}
|
||||
|
||||
private void writeEmbeddedAssoc() {
|
||||
writer.append(" @io.ebean.typequery.Generated(\"io.ebean.querybean.generator\") @io.ebean.typequery.TypeQueryBean(\"v1\")").eol();
|
||||
writer.append(" class Assoc<R> : io.ebean.typequery.TQAssoc<%s,R> {", beanFullName).eol().eol();
|
||||
writeFields(true);
|
||||
writer.append(" protected constructor(name: String, root: R) : super(name, root)").eol();
|
||||
writer.append(" protected constructor(name: String, root: R, prefix: String) : super(name, root, prefix)").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
}
|
||||
|
||||
private void writeAssocClasses() {
|
||||
writer.append(" @io.ebean.typequery.Generated(\"io.ebean.querybean.generator\") @io.ebean.typequery.TypeQueryBean(\"v1\")").eol();
|
||||
writer.append(" abstract class Assoc<R> : io.ebean.typequery.TQAssocBean<%s, R, Q%s> {", beanFullName, shortName).eol();
|
||||
|
||||
writeFields(true);
|
||||
writer.append(" protected constructor(name: String, root: R) : super(name, root)").eol();
|
||||
writer.append(" protected constructor(name: String, root: R, prefix: String) : super(name, root, prefix)").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
|
||||
writer.append(" @io.ebean.typequery.Generated(\"io.ebean.querybean.generator\") @io.ebean.typequery.TypeQueryBean(\"v1\")").eol();
|
||||
writer.append(" class AssocOne<R> : Assoc<R> {").eol();
|
||||
writer.append(" constructor(name: String, root: R) : super(name, root)").eol();
|
||||
writer.append(" constructor(name: String, root: R, prefix: String) : super(name, root, prefix)").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
|
||||
writer.append(" @io.ebean.typequery.Generated(\"io.ebean.querybean.generator\") @io.ebean.typequery.TypeQueryBean(\"v1\")").eol();
|
||||
writer.append(" class AssocMany<R> : Assoc<R>, io.ebean.typequery.TQAssocMany<%s, R, Q%s> {", beanFullName, shortName).eol();
|
||||
writer.append(" constructor(name: String, root: R) : super(name, root)").eol();
|
||||
writer.append(" constructor(name: String, root: R, prefix: String) : super(name, root, prefix)").eol();
|
||||
writer.eol();
|
||||
writer.append(" override fun filterMany(apply: java.util.function.Consumer<Q%s>): R {", shortName).eol();
|
||||
writer.append(" val list: io.ebean.ExpressionList<%s> = _newExpressionList<%s>()", beanFullName, beanFullName).eol();
|
||||
writer.append(" apply.accept(Q%s(list))", shortName).eol();
|
||||
writer.append(" return _filterMany(list)").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
writer.append(" override fun filterMany(filter: io.ebean.ExpressionList<%s>): R {", beanFullName).eol();
|
||||
writer.append(" return _filterMany(filter)").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
writer.append(" override fun filterManyRaw(rawExpressions: String, vararg params: Any): R {").eol();
|
||||
writer.append(" return _filterManyRaw(rawExpressions, *params)").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
|
||||
// Ebean 14.x only
|
||||
writer.append(" @Deprecated(\"for removal, migrate to filterManyRaw()\")").eol();
|
||||
writer.append(" override fun filterMany(rawExpressions: String, vararg params: Any): R {").eol();
|
||||
writer.append(" return _filterMany(rawExpressions, *params)").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
|
||||
writer.append(" override fun isEmpty(): R {").eol();
|
||||
writer.append(" return _isEmpty() ").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
writer.append(" override fun isNotEmpty(): R {").eol();
|
||||
writer.append(" return _isNotEmpty() ").eol();
|
||||
writer.append(" }").eol().eol();
|
||||
|
||||
writer.append(" }").eol();
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,67 +15,67 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hsqldb</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlanywhere</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
|
||||
|
||||
@@ -24,6 +24,7 @@ public class H2Platform extends DatabasePlatform {
|
||||
this.dbEncrypt = new H2DbEncrypt();
|
||||
this.historySupport = new H2HistorySupport();
|
||||
this.nativeUuidType = true;
|
||||
this.selectCountWithColumnAlias = true;
|
||||
this.supportsDeleteTableAlias = true;
|
||||
this.inlineSqlUpdateLimit = true;
|
||||
this.dbDefaultValue.setNow("now()");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -16,6 +16,7 @@ public class MariaDbPlatform extends BaseMySqlPlatform {
|
||||
super();
|
||||
this.platform = Platform.MARIADB;
|
||||
this.sequenceBatchMode = false;
|
||||
this.selectCountWithColumnAlias = true;
|
||||
// for MariaDB probably turn off forwardOnlyHintOnFindIterate with later driver
|
||||
// this.forwardOnlyHintOnFindIterate = false;
|
||||
this.historySupport = new MariaDbHistorySupport();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -13,6 +13,7 @@ public abstract class BaseMySqlPlatform extends DatabasePlatform {
|
||||
public BaseMySqlPlatform() {
|
||||
super();
|
||||
this.useExtraTransactionOnIterateSecondaryQueries = true;
|
||||
this.selectCountWithColumnAlias = true;
|
||||
this.selectCountWithAlias = true;
|
||||
this.supportsSavepointId = false;
|
||||
this.inlineSqlUpdateLimit = true;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>platforms</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ebean parent</name>
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<name>querybean generator</name>
|
||||
<description>Querybean generator</description>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<description>Generates Ebean Query beans for type safe ORM query building and execution</description>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
+4
-1
@@ -403,6 +403,10 @@ class ProcessingContext implements Constants {
|
||||
messager.printMessage(Diagnostic.Kind.ERROR, String.format(msg, args), e);
|
||||
}
|
||||
|
||||
void logWarn(String msg, Object... args) {
|
||||
messager.printMessage(Diagnostic.Kind.WARNING, String.format(msg, args));
|
||||
}
|
||||
|
||||
void logNote(String msg, Object... args) {
|
||||
messager.printMessage(Diagnostic.Kind.NOTE, String.format(msg, args));
|
||||
}
|
||||
@@ -549,7 +553,6 @@ class ProcessingContext implements Constants {
|
||||
} catch (FilerException e) {
|
||||
logNote(null, "FilerException reading services file: " + e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logError(null, "Error reading services file: " + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.ebean.querybean.generator;
|
||||
|
||||
import javax.annotation.processing.AbstractProcessor;
|
||||
import javax.annotation.processing.FilerException;
|
||||
import javax.annotation.processing.ProcessingEnvironment;
|
||||
import javax.annotation.processing.RoundEnvironment;
|
||||
import javax.lang.model.SourceVersion;
|
||||
@@ -16,7 +17,6 @@ import java.util.Set;
|
||||
public class Processor extends AbstractProcessor implements Constants {
|
||||
|
||||
private ProcessingContext processingContext;
|
||||
private SimpleModuleInfoWriter moduleWriter;
|
||||
|
||||
public Processor() {
|
||||
}
|
||||
@@ -49,7 +49,6 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
int count = processEntities(roundEnv);
|
||||
processOthers(roundEnv);
|
||||
final int loaded = processingContext.complete();
|
||||
initModuleInfoBean();
|
||||
if (roundEnv.processingOver()) {
|
||||
writeModuleInfoBean();
|
||||
}
|
||||
@@ -86,26 +85,12 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
}
|
||||
}
|
||||
|
||||
private void initModuleInfoBean() {
|
||||
try {
|
||||
if (moduleWriter == null) {
|
||||
moduleWriter = new SimpleModuleInfoWriter(processingContext);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to initialise EntityClassRegister error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
}
|
||||
}
|
||||
|
||||
private void writeModuleInfoBean() {
|
||||
try {
|
||||
if (moduleWriter == null) {
|
||||
processingContext.logError(null, "EntityClassRegister was not initialised and not written");
|
||||
} else {
|
||||
moduleWriter.write();
|
||||
}
|
||||
new SimpleModuleInfoWriter(processingContext).write();
|
||||
} catch (FilerException e) {
|
||||
processingContext.logWarn(null, "FilerException trying to write EntityClassRegister: " + e);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(null, "Failed to write EntityClassRegister error:" + e + " stack:" + Arrays.toString(e.getStackTrace()));
|
||||
}
|
||||
}
|
||||
@@ -115,7 +100,6 @@ public class Processor extends AbstractProcessor implements Constants {
|
||||
SimpleQueryBeanWriter beanWriter = new SimpleQueryBeanWriter((TypeElement) element, processingContext);
|
||||
beanWriter.writeRootBean();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
processingContext.logError(element, "Error generating query beans: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>tests</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>tests</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-java16</artifactId>
|
||||
@@ -18,7 +18,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -30,14 +30,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>tests</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-kotlin</artifactId>
|
||||
@@ -40,7 +40,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -53,7 +53,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>14.8.1</version>
|
||||
<version>14.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<!-- <artifactId>querybean-generator</artifactId>-->
|
||||
<version>14.8.0</version>
|
||||
<version>14.8.1</version>
|
||||
</annotationProcessorPath>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.example.domain
|
||||
|
||||
import jakarta.persistence.*
|
||||
|
||||
@Entity
|
||||
@Table(name = "t_inner2")
|
||||
class MyKInnerEmb {
|
||||
|
||||
@Id
|
||||
var one: Long = 0
|
||||
var two: String = "0"
|
||||
var address: EmbAddre? = null
|
||||
|
||||
@Embeddable
|
||||
data class EmbAddre(val line1: String, val line2: String)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user