Compare commits

..
10 Commits
Author SHA1 Message Date
Rob Bygrave 2143ebc21c Bump ebean-agent to 13.13.2 2023-02-27 15:49:41 +13:00
Rob BygraveandGitHub 7dd25344ef Merge pull request #2986 from ebean-orm/feature/querybeans-assoc-supportInterfaceUse
[querybeans] Add support for using interface types with querybean expressions eq() in() etc WHEN entity beans implement an interface
2023-02-27 15:29:07 +13:00
Rob Bygrave c381464316 querybean-generation - cast for varargs use and use wildcard collections 2023-02-27 15:24:59 +13:00
Rob Bygrave a5d5549f2c [querybeans] Add support for using interface types with querybean expressions eq() in() etc WHEN entity beans implement an interface
- For the case where entity beans implement an interface
- Adds these expressions to the "associated" querybeans (not the root querybeans).
- The expressions added use of the interface type
2023-02-27 13:12:52 +13:00
Rob BygraveandGitHub d7d144b908 Merge pull request #2985 from ebean-orm/feature/querybean-assoc-eqIfPresent
For querybean associated beans, add missing eqIfPresent() + in() + notIn() + expressions
2023-02-26 19:28:55 +13:00
Rob Bygrave 25416a3cda For querybean associated beans, add missing eqIfPresent() + in() + notIn() + expressions 2023-02-26 19:24:00 +13:00
Rob Bygrave e6b0306bde Fix test TestStdFunctions for Oracle which only supports 2 parameters with concat() 2023-02-25 01:06:40 +13:00
Rob Bygrave 2d6ca4bb1e Fix build of test-java16 module for JDK 16+ 2023-02-25 00:25:05 +13:00
Rob Bygrave 99d5f4f01c Bump to next version 13.13.2 2023-02-24 23:56:44 +13:00
rob 8ea0936da8 Tighten Javax to Jakarta escaping the periods 2023-02-23 20:43:50 +13:00
67 changed files with 582 additions and 250 deletions
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-clickhouse</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-clickhouse</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-cockroach</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-db2</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-db2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-h2</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-hana</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hana</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-mariadb</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mariadb</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-mysql</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-nuodb</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-nuodb</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-oracle</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-oracle</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-postgres</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-sqlite</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlite</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-sqlserver</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean-yugabyte</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+8 -8
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean (all platforms)</name>
@@ -16,31 +16,31 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-joda-time</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-jsonnode</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -53,13 +53,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>composites</artifactId>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean api</name>
+3 -3
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<!-- <parent>-->
<!-- <groupId>org.avaje</groupId>-->
@@ -26,7 +26,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
@@ -69,7 +69,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+29 -29
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean bom</name>
@@ -89,106 +89,106 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-joda-time</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-jsonnode</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-xml</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-autotune</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>kotlin-querybean-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgis</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-redis</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<!-- platforms -->
@@ -196,67 +196,67 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-clickhouse</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-db2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-hana</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-mariadb</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-mysql</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-nuodb</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-oracle</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgres</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-sqlite</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-sqlserver</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-core-type</artifactId>
@@ -16,7 +16,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
+7 -7
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-core</artifactId>
@@ -22,7 +22,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -46,13 +46,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -143,21 +143,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-csv-reader</artifactId>
@@ -14,21 +14,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean ddl generation</name>
@@ -28,14 +28,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
@@ -72,7 +72,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean external mapping api</name>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<scm>
@@ -21,7 +21,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<!-- JAVAX-DEPENDENCY-START -->
@@ -68,21 +68,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-jackson-jsonnode</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
+2 -2
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
+2 -2
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
+3 -3
View File
@@ -6,7 +6,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-kotlin</artifactId>
@@ -28,7 +28,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
@@ -50,7 +50,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+4 -4
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean postgis</name>
@@ -22,14 +22,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<!-- provided scope -->
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
@@ -65,7 +65,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean querybean</name>
@@ -17,7 +17,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
@@ -63,21 +63,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
@@ -1,5 +1,6 @@
package io.ebean.typequery;
import io.avaje.lang.Nullable;
import io.ebean.ExpressionList;
import io.ebean.FetchConfig;
import io.ebean.FetchGroup;
@@ -7,6 +8,7 @@ import io.ebeaninternal.api.SpiQueryFetch;
import io.ebeaninternal.server.querydefn.OrmQueryDetail;
import io.ebeaninternal.server.querydefn.SpiFetchGroup;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -193,6 +195,17 @@ public abstract class TQAssocBean<T, R> extends TQProperty<R, Object> {
return _root;
}
/**
* Is EQUAL TO if value is non-null and otherwise no expression is added to the query.
* <p>
* This is effectively a helper method that allows a query to be built in fluid style where some predicates are
* effectively optional. We can use <code>eqIfPresent()</code> rather than having a separate if block.
*/
public final R eqIfPresent(@Nullable T other) {
expr().eqIfPresent(_name, other);
return _root;
}
/**
* Is equal to by ID property.
*/
@@ -215,6 +228,95 @@ public abstract class TQAssocBean<T, R> extends TQProperty<R, Object> {
return ne(other);
}
/**
* Is in a list of values.
*
* @param values the list of values for the predicate
* @return the root query bean instance
*/
@SafeVarargs
public final R in(T... values) {
expr().in(_name, (Object[]) values);
return _root;
}
/**
* Is in a list of values.
*
* @param values the list of values for the predicate
* @return the root query bean instance
*/
public final R in(Collection<T> values) {
expr().in(_name, values);
return _root;
}
/**
* In where null or empty values means that no predicate is added to the query.
* <p>
* That is, only add the IN predicate if the values are not null or empty.
* <p>
* Without this we typically need to code an <code>if</code> block to only add
* the IN predicate if the collection is not empty like:
* </p>
*
* <h3>Without inOrEmpty()</h3>
* <pre>{@code
*
* List<String> names = Arrays.asList("foo", "bar");
*
* QCustomer query = new QCustomer()
* .registered.before(LocalDate.now())
*
* // conditionally add the IN expression to the query
* if (names != null && !names.isEmpty()) {
* query.name.in(names)
* }
*
* query.findList();
*
* }</pre>
*
* <h3>Using inOrEmpty()</h3>
* <pre>{@code
*
* List<String> names = Arrays.asList("foo", "bar");
*
* new QCustomer()
* .registered.before(LocalDate.now())
* .name.inOrEmpty(names)
* .findList();
*
* }</pre>
*/
public final R inOrEmpty(Collection<T> values) {
expr().inOrEmpty(_name, values);
return _root;
}
/**
* Is NOT in a list of values.
*
* @param values the list of values for the predicate
* @return the root query bean instance
*/
public final R notIn(Collection<T> values) {
expr().notIn(_name, values);
return _root;
}
/**
* Is NOT in a list of values.
*
* @param values the list of values for the predicate
* @return the root query bean instance
*/
@SafeVarargs
public final R notIn(T... values) {
expr().notIn(_name, (Object[]) values);
return _root;
}
/**
* Apply a filter when fetching these beans.
*/
@@ -930,7 +930,7 @@ public abstract class TQRootBean<T, R> {
/**
* Specify the PersistenceContextScope to use for this query.
* <p>
* When this is not set the 'default' configured on {@link io.ebean.config.ServerConfig#setPersistenceContextScope(PersistenceContextScope)}
* When this is not set the 'default' configured on {@link io.ebean.config.DatabaseConfig#setPersistenceContextScope(PersistenceContextScope)}
* is used - this value defaults to {@link io.ebean.PersistenceContextScope#TRANSACTION}.
* <p>
* Note that the same persistence Context is used for subsequent lazy loading and query join queries.
@@ -2117,12 +2117,10 @@ public abstract class TQRootBean<T, R> {
* Return the current expression list that expressions should be added to.
*/
protected ExpressionList<T> peekExprList() {
if (textMode) {
// return the current text expression list
return _peekText();
}
if (whereStack == null) {
whereStack = new ArrayStack<>();
whereStack.push(query.where());
@@ -2,6 +2,7 @@ package org.querytest;
import io.ebean.*;
import io.ebean.annotation.Transactional;
import io.ebean.test.LoggedSql;
import io.ebean.types.Inet;
import org.example.domain.*;
import org.example.domain.otherpackage.PhoneNumber;
@@ -315,10 +316,11 @@ public class QCustomerTest {
@Test
public void testAssocOne() {
DB.getDefault();
Address address = new Address();
address.setId(41L);
LoggedSql.start();
new QCustomer()
.billingAddress.eq(address)
.findList();
@@ -334,6 +336,85 @@ public class QCustomerTest {
new QCustomer()
.billingAddress.notEqualTo(address)
.findList();
new QCustomer()
.billingAddress.eqIfPresent(address)
.name.isNull()
.findList();
new QCustomer()
.billingAddress.eqIfPresent(null)
.name.isNull()
.findList();
List<String> sql = LoggedSql.stop();
assertThat(sql).hasSize(6);
assertThat(sql.get(0)).contains("where t0.billing_address_id = ?");
assertThat(sql.get(1)).contains("where t0.billing_address_id = ?");
assertThat(sql.get(2)).contains("where t0.billing_address_id <> ?");
assertThat(sql.get(3)).contains("where t0.billing_address_id <> ?");
assertThat(sql.get(4)).contains("where t0.billing_address_id = ? and t0.name is null");
assertThat(sql.get(5)).contains("where t0.name is null");
}
@Test
public void testAssocOne_in() {
DB.getDefault();
Address address = new Address();
address.setId(41L);
Address address2 = new Address();
address2.setId(41L);
LoggedSql.start();
new QCustomer()
.billingAddress.in(address, address2)
.findList();
new QCustomer()
.billingAddress.in(List.of(address, address2))
.findList();
new QCustomer()
.billingAddress.inOrEmpty(List.of(address, address2))
.name.isNull()
.findList();
new QCustomer()
.billingAddress.inOrEmpty(List.of())
.name.isNull()
.findList();
List<String> sql = LoggedSql.stop();
assertThat(sql).hasSize(4);
assertThat(sql.get(0)).contains("where t0.billing_address_id in (?,?)");
assertThat(sql.get(1)).contains("where t0.billing_address_id in (?,?)");
assertThat(sql.get(2)).contains("where t0.billing_address_id in (?,?) and t0.name is null");
assertThat(sql.get(3)).contains("where t0.name is null");
}
@Test
public void testAssocOne_notIn() {
DB.getDefault();
Address address = new Address();
address.setId(41L);
Address address2 = new Address();
address2.setId(41L);
LoggedSql.start();
new QCustomer()
.billingAddress.notIn(address, address2)
.findList();
new QCustomer()
.billingAddress.notIn(List.of(address, address2))
.findList();
List<String> sql = LoggedSql.stop();
assertThat(sql).hasSize(2);
assertThat(sql.get(0)).contains("where t0.billing_address_id not in (?,?)");
assertThat(sql.get(1)).contains("where t0.billing_address_id not in (?,?)");
}
@Test
+6 -6
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-redis</artifactId>
@@ -22,35 +22,35 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
+8 -8
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>ebean test</name>
@@ -28,20 +28,20 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -118,28 +118,28 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-joda-time</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-jsonnode</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
@@ -31,7 +31,7 @@ class TestStdFunctions {
assertThat(query.getGeneratedSql()).contains("select coalesce(t0.name,'na') from o_customer t0 where coalesce(t0.name,'na') like ?");
}
@IgnorePlatform({Platform.DB2})
@IgnorePlatform({Platform.DB2, Platform.ORACLE})
@Test
void concatEq() {
var name = Query.Property.of("name");
@@ -46,4 +46,20 @@ class TestStdFunctions {
query.findSingleAttributeList();
assertThat(query.getGeneratedSql()).contains("select concat(t0.name,'na',t0.status) from o_customer t0 where concat(t0.name,'na',t0.status) = ?");
}
@IgnorePlatform({Platform.DB2})
@Test
void concatEqOnly2() {
var name = Query.Property.of("name");
var status = Query.Property.of("status");
var query = DB.find(Customer.class)
.select(concat(name, status).toString())
.where()
.add(eq(concat(name, "na"), "foo"))
.query();
query.findSingleAttributeList();
assertThat(query.getGeneratedSql()).contains("select concat(t0.name,t0.status) from o_customer t0 where concat(t0.name,'na') = ?");
}
}
Regular → Executable
+8 -8
View File
@@ -9,16 +9,16 @@ find . -type f -name 'pom.xml' -exec sed -i'' -e 's|____ JAVAX-DEPENDENCY-END --
sed -i'' -e 's|artifactId>jakarta-persistence-api|artifactId>persistence-api|g' ebean-api/pom.xml ebean-bom/pom.xml
## adjust module-info
sed -i'' -e 's| jakarta.persistence.api| persistence.api|g' ebean-api/src/main/java/module-info.java
sed -i'' -e 's| jakarta.servlet;| javax.servlet.api;|g' ebean-api/src/main/java/module-info.java
sed -i'' -e 's| jakarta\.persistence\.api| persistence\.api|g' ebean-api/src/main/java/module-info.java
sed -i'' -e 's| jakarta\.servlet;| javax\.servlet\.api;|g' ebean-api/src/main/java/module-info.java
find . -type f -name 'module-info.java' -exec sed -i'' -e 's|jakarta.xml.bind|java.xml.bind|g' {} +
find . -type f -name 'module-info.java' -exec sed -i'' -e 's|jakarta\.xml\.bind|java\.xml\.bind|g' {} +
## adjust code
find ebean-api/src/main/java/io/ebean/event -type f -name '*.java' -exec sed -i'' -e 's|jakarta.servlet|javax.servlet|g' {} +
find ebean-api/src/main/java/io/ebean/event -type f -name '*.java' -exec sed -i'' -e 's|jakarta\.servlet|javax\.servlet|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|jakarta.persistence.|javax.persistence.|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|jakarta.persistence.|javax.persistence.|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|jakarta.xml.bind|javax.xml.bind|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|jakarta.xml.bind|javax.xml.bind|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|jakarta\.persistence\.|javax\.persistence\.|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|jakarta\.persistence\.|javax\.persistence\.|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|jakarta\.xml\.bind|javax\.xml\.bind|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|jakarta\.xml\.bind|javax\.xml\.bind|g' {} +
Regular → Executable
+8 -8
View File
@@ -9,16 +9,16 @@ find . -type f -name 'pom.xml' -exec sed -i'' -e 's|____ JAKARTA-DEPENDENCY-END
sed -i'' -e 's|artifactId>persistence-api|artifactId>jakarta-persistence-api|g' ebean-api/pom.xml ebean-bom/pom.xml
## adjust module-info
sed -i'' -e 's| persistence.api| jakarta.persistence.api|g' ebean-api/src/main/java/module-info.java
sed -i'' -e 's| javax.servlet.api| jakarta.servlet|g' ebean-api/src/main/java/module-info.java
sed -i'' -e 's| persistence\.api| jakarta\.persistence\.api|g' ebean-api/src/main/java/module-info.java
sed -i'' -e 's| javax\.servlet\.api| jakarta\.servlet|g' ebean-api/src/main/java/module-info.java
find . -type f -name 'module-info.java' -exec sed -i'' -e 's|java.xml.bind|jakarta.xml.bind|g' {} +
find . -type f -name 'module-info.java' -exec sed -i'' -e 's|java\.xml\.bind|jakarta\.xml\.bind|g' {} +
## adjust code
find ebean-api/src/main/java/io/ebean/event -type f -name '*.java' -exec sed -i'' -e 's|javax.servlet|jakarta.servlet|g' {} +
find ebean-api/src/main/java/io/ebean/event -type f -name '*.java' -exec sed -i'' -e 's|javax\.servlet|jakarta\.servlet|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|javax.persistence.|jakarta.persistence.|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|javax.persistence.|jakarta.persistence.|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|javax.xml.bind|jakarta.xml.bind|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|javax.xml.bind|jakarta.xml.bind|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|javax\.persistence\.|jakarta\.persistence\.|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|javax\.persistence\.|jakarta\.persistence\.|g' {} +
find . -type f -name '*.java' -exec sed -i'' -e 's|javax\.xml\.bind|jakarta\.xml\.bind|g' {} +
find . -type f -name '*.kt' -exec sed -i'' -e 's|javax\.xml\.bind|jakarta\.xml\.bind|g' {} +
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>kotlin querybean generator</name>
@@ -29,7 +29,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
@@ -43,7 +43,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
@@ -64,14 +64,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
@@ -31,4 +31,7 @@ interface Constants {
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";
String AVAJE_LANG_NULLABLE = "io.avaje.lang.Nullable";
String JAVA_COLLECTION = "java.util.Collection";
}
@@ -334,7 +334,7 @@ class ProcessingContext implements Constants {
}
}
private Element asElement(TypeMirror argType) {
Element asElement(TypeMirror argType) {
if (argType.getKind() == TypeKind.WILDCARD) {
argType = ((WildcardType) argType).getExtendsBound();
}
@@ -3,6 +3,7 @@ package io.ebean.querybean.generator;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@@ -65,6 +66,9 @@ class SimpleQueryBeanWriter {
private final Set<String> importTypes = new TreeSet<>();
private final List<PropertyMeta> properties = new ArrayList<>();
private final TypeElement element;
private final TypeElement implementsInterface;
private String implementsInterfaceFullName;
private String implementsInterfaceShortName;
private final ProcessingContext processingContext;
private final boolean isEntity;
private final boolean embeddable;
@@ -96,6 +100,18 @@ class SimpleQueryBeanWriter {
this.isEntity = processingContext.isEntity(element);
this.embeddable = processingContext.isEmbeddable(element);
this.dbName = findDbName();
this.implementsInterface = initInterface(element);
}
private TypeElement initInterface(TypeElement element) {
for (TypeMirror anInterface : element.getInterfaces()) {
TypeElement e = (TypeElement)processingContext.asElement(anInterface);
String name = e.getQualifiedName().toString();
if (!name.startsWith("java") && !name.startsWith("io.ebean")) {
return e;
}
}
return null;
}
private String findDbName() {
@@ -115,6 +131,11 @@ class SimpleQueryBeanWriter {
importTypes.add(Constants.FETCHGROUP);
importTypes.add(Constants.QUERY);
importTypes.add(Constants.TRANSACTION);
if (implementsInterface != null) {
implementsInterfaceFullName = implementsInterface.getQualifiedName().toString();
boolean nested = implementsInterface.getNestingKind().isNested();
implementsInterfaceShortName = Util.shortName(nested, implementsInterfaceFullName);
}
if (dbName != null) {
importTypes.add(Constants.DB);
}
@@ -219,6 +240,11 @@ class SimpleQueryBeanWriter {
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
@@ -255,9 +281,33 @@ class SimpleQueryBeanWriter {
private void writeAssocBeanFetch() {
if (isEntity()) {
lang().fetch(writer, origShortName);
//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.
*/
+14 -14
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-all</artifactId>
@@ -14,67 +14,67 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-clickhouse</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-db2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hana</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hsqldb</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mariadb</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-nuodb</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-oracle</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlanywhere</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlite</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-clickhouse</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-db2</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-h2</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-hana</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-hsqldb</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+3 -3
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-mariadb</artifactId>
@@ -14,13 +14,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-mysql</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-nuodb</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-oracle</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>platforms</artifactId>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-postgres</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-sqlanywhere</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-sqlite</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>ebean-platform-sqlserver</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
+3 -3
View File
@@ -9,7 +9,7 @@
<groupId>io.ebean</groupId>
<artifactId>ebean-parent</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<packaging>pom</packaging>
<name>ebean parent</name>
@@ -49,8 +49,8 @@
<ebean-migration.version>13.7.0</ebean-migration.version>
<ebean-test-containers.version>6.3</ebean-test-containers.version>
<ebean-datasource.version>8.5</ebean-datasource.version>
<ebean-agent.version>13.13.1</ebean-agent.version>
<ebean-maven-plugin.version>13.13.1</ebean-maven-plugin.version>
<ebean-agent.version>13.13.2</ebean-agent.version>
<ebean-maven-plugin.version>13.13.2</ebean-maven-plugin.version>
<surefire.useModulePath>false</surefire.useModulePath>
</properties>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<name>querybean generator</name>
@@ -33,4 +33,6 @@ interface Constants {
String METAINF_MANIFEST = "META-INF/ebean-generated-info.mf";
String METAINF_SERVICES_MODULELOADER = "META-INF/services/io.ebean.config.EntityClassRegister";
String AVAJE_LANG_NULLABLE = "io.avaje.lang.Nullable";
String JAVA_COLLECTION = "java.util.Collection";
}
@@ -541,4 +541,8 @@ class ProcessingContext implements Constants {
}
return null;
}
Element asElement(TypeMirror mirror) {
return typeUtils.asElement(mirror);
}
}
@@ -3,6 +3,7 @@ package io.ebean.querybean.generator;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
import javax.tools.JavaFileObject;
import java.io.IOException;
import java.io.Writer;
@@ -20,6 +21,9 @@ class SimpleQueryBeanWriter {
private final Set<String> importTypes = new TreeSet<>();
private final List<PropertyMeta> properties = new ArrayList<>();
private final TypeElement element;
private final TypeElement implementsInterface;
private String implementsInterfaceFullName;
private String implementsInterfaceShortName;
private final ProcessingContext processingContext;
private final String dbName;
private final String beanFullName;
@@ -47,6 +51,18 @@ class SimpleQueryBeanWriter {
this.isEntity = processingContext.isEntity(element);
this.embeddable = processingContext.isEmbeddable(element);
this.dbName = findDbName();
this.implementsInterface = initInterface(element);
}
private TypeElement initInterface(TypeElement element) {
for (TypeMirror anInterface : element.getInterfaces()) {
TypeElement e = (TypeElement)processingContext.asElement(anInterface);
String name = e.getQualifiedName().toString();
if (!name.startsWith("java") && !name.startsWith("io.ebean")) {
return e;
}
}
return null;
}
private String findDbName() {
@@ -70,7 +86,11 @@ class SimpleQueryBeanWriter {
importTypes.add(Constants.FETCHGROUP);
importTypes.add(Constants.QUERY);
importTypes.add(Constants.TRANSACTION);
if (implementsInterface != null) {
implementsInterfaceFullName = implementsInterface.getQualifiedName().toString();
boolean nested = implementsInterface.getNestingKind().isNested();
implementsInterfaceShortName = Util.shortName(nested, implementsInterfaceFullName);
}
if (dbName != null) {
importTypes.add(Constants.DB);
}
@@ -154,6 +174,11 @@ class SimpleQueryBeanWriter {
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
@@ -267,9 +292,34 @@ class SimpleQueryBeanWriter {
writeAssocBeanFetch("Query", "Eagerly fetch this association using a 'query join' loading the specified properties.");
writeAssocBeanFetch("Cache", "Eagerly fetch this association using L2 cache.");
writeAssocBeanFetch("Lazy", "Use lazy loading for this association loading the specified properties.");
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<? extends " + 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<? extends " + 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";
String castVarargs = expression.equals("in") ? "(Object[])" : "";
writer.append(" /**").eol();
writer.append(" * ").append(comment).eol();
writer.append(" */").eol();
writer.append(" public final R %s(%s%s %s) {", expression, nullableAnnotation, param, values).eol();
writer.append(" expr().%s(_name, %s%s);", actualExpression, castVarargs, values).eol();
writer.append(" return _root;").eol();
writer.append(" }").eol();
writer.eol();
}
private void writeAssocBeanFetch(String fetchType, String comment) {
writer.append(" /**").eol();
writer.append(" * ").append(comment).eol();
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>tests</artifactId>
+5 -9
View File
@@ -5,20 +5,20 @@
<parent>
<artifactId>tests</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>test-java16</artifactId>
<properties>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<java.release>16</java.release>
</properties>
<dependencies>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
</dependency>
<dependency>
@@ -30,7 +30,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
@@ -47,11 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>16</release>
<source>16</source>
<target>16</target>
<annotationProcessorPaths>
<path>
<groupId>io.ebean</groupId>
@@ -65,7 +61,7 @@
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>2.24</version>
<version>2.34</version>
<extensions>true</extensions>
<configuration>
<tiles>
+27 -3
View File
@@ -6,7 +6,7 @@
<parent>
<artifactId>tests</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.1</version>
<version>13.13.2</version>
</parent>
<artifactId>test-kotlin</artifactId>
@@ -21,6 +21,12 @@
</properties>
<dependencies>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>13.13.2</version>
</dependency>
<dependency>
<groupId>io.avaje</groupId>
<artifactId>junit</artifactId>
@@ -31,14 +37,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.1</version>
<version>13.13.2</version>
<scope>test</scope>
</dependency>
@@ -81,6 +87,24 @@
<goal>test-compile</goal>
</goals>
</execution>
<!-- <execution>-->
<!-- <id>test-kapt</id>-->
<!-- <goals>-->
<!-- <goal>test-kapt</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <sourceDirs>-->
<!-- <sourceDir>src/test/kotlin</sourceDir>-->
<!-- </sourceDirs>-->
<!-- <annotationProcessorPaths>-->
<!-- <annotationProcessorPath>-->
<!-- <groupId>io.ebean</groupId>-->
<!-- <artifactId>kotlin-querybean-generator</artifactId>-->
<!-- <version>13.13.2</version>-->
<!-- </annotationProcessorPath>-->
<!-- </annotationProcessorPaths>-->
<!-- </configuration>-->
<!-- </execution>-->
</executions>
</plugin>
<plugin>
@@ -0,0 +1,5 @@
package org.example.api
interface ICustomer {
}
@@ -3,11 +3,12 @@ package org.example.order
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Version
import org.example.api.ICustomer
@Entity
class Customer(
name: String,
) {
) : ICustomer {
@Id
var id: Int = 0
val name: String = name