Compare commits

..
8 Commits
Author SHA1 Message Date
Rob Bygrave b5fbfbf1b6 Version 13.14.0 2023-03-01 00:08:52 +13:00
Rob BygraveandGitHub 4471607b2d Merge pull request #2989 from ebean-orm/fix/queryBeans-inheritance-parentOnlyHasDiscriminatorValue
[QueryBeans] Generate the query beans as final classes
2023-02-28 23:16:14 +13:00
Rob Bygrave e4c4b0b43d [QueryBeans] Generate the query beans as final classes 2023-02-28 23:15:42 +13:00
Rob BygraveandGitHub d7ffc4bbb5 Merge pull request #2988 from ebean-orm/fix/queryBeans-inheritance-parentOnlyHasDiscriminatorValue
[QueryBeans] Fix for missing inherited properties when parent only has @DiscriminatorValue
2023-02-28 23:06:03 +13:00
Rob Bygrave 0bb2f104a4 [QueryBeans] Fix for missing inherited properties when parent only has @DiscriminatorValue
A parent in the Inheritance hierarchy has @DiscriminatorValue but not the @Inheritance annotation. The bug means the inherited properties are not included on the generated query bean.

The fix is to the querybean-generator to pick up inherited properties for this case.
2023-02-28 23:02:19 +13:00
Rob BygraveandGitHub ac3ca8113d Merge pull request #2987 from ebean-orm/feature/querybeans-refactor-assoc
[QueryBeans] Refactor splitting TQAssocBean into TQAssoc & TQAssocBean
2023-02-28 21:56:35 +13:00
Rob Bygrave 4ec46e3008 [QueryBeans] Refactor splitting TQAssocBean into TQAssoc & TQAssocBean
- Requires ebean-agent to be up-to-date (13.13.2 or greater)
- Split TQAssocBean into 2, one for embeddable beans and the other for the reset
- The eq(), in() etc expressions go to TQAssoc
- Add fetch() methods to TQAssocBean
- No longer generate the fetch() methods as we now have them on TQAssocBean
2023-02-27 17:46:11 +13:00
Rob Bygrave e9ab0f34f3 Next snapshot version 2023-02-27 16:57:38 +13:00
66 changed files with 522 additions and 413 deletions
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-clickhouse</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-clickhouse</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-cockroach</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-db2</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-db2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-h2</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-hana</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hana</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-mariadb</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mariadb</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-mysql</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-nuodb</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-nuodb</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-oracle</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-oracle</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-postgres</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-sqlite</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlite</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-sqlserver</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+5 -5
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean-yugabyte</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -35,13 +35,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+8 -8
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>composites</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean (all platforms)</name>
@@ -16,31 +16,31 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-joda-time</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-jsonnode</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -53,13 +53,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<!-- <parent>-->
<!-- <groupId>org.avaje</groupId>-->
@@ -26,7 +26,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
@@ -69,7 +69,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<name>ebean bom</name>
@@ -89,106 +89,106 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-joda-time</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-jsonnode</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-xml</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-autotune</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>kotlin-querybean-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgis</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-redis</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<!-- platforms -->
@@ -196,67 +196,67 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-clickhouse</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-db2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-hana</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-mariadb</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-mysql</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-nuodb</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-oracle</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-postgres</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-sqlite</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-sqlserver</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-core-type</artifactId>
@@ -16,7 +16,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
+7 -7
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-core</artifactId>
@@ -22,7 +22,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -46,13 +46,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -143,21 +143,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-csv-reader</artifactId>
@@ -14,21 +14,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<name>ebean ddl generation</name>
@@ -28,14 +28,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
@@ -72,7 +72,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<scm>
@@ -21,7 +21,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-externalmapping-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<!-- JAVAX-DEPENDENCY-START -->
@@ -68,21 +68,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-jackson-jsonnode</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core-type</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-kotlin</artifactId>
@@ -28,7 +28,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
@@ -50,7 +50,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<name>ebean postgis</name>
@@ -22,14 +22,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<!-- provided scope -->
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
@@ -65,7 +65,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
+7 -7
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>ebean querybean</name>
@@ -17,7 +17,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
@@ -63,21 +63,21 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
@@ -103,11 +103,11 @@
<plugin>
<groupId>io.repaint.maven</groupId>
<artifactId>tiles-maven-plugin</artifactId>
<version>2.24</version>
<version>2.34</version>
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:13.13.1</tile>
<tile>io.ebean.tile:enhancement:13.13.2</tile>
</tiles>
</configuration>
</plugin>
@@ -0,0 +1,162 @@
package io.ebean.typequery;
import io.avaje.lang.Nullable;
import java.util.Collection;
/**
* Base type for associated beans.
*
* @param <T> the entity bean type (normal entity bean type e.g. Customer)
* @param <R> the specific root query bean type (e.g. QCustomer)
*/
public abstract class TQAssoc<T, R> extends TQProperty<R, Object> {
/**
* Construct with a property name and root instance.
*
* @param name the name of the property
* @param root the root query bean instance
*/
public TQAssoc(String name, R root) {
this(name, root, null);
}
/**
* Construct with additional path prefix.
*/
public TQAssoc(String name, R root, String prefix) {
super(name, root, prefix);
}
/**
* Is equal to by ID property.
*/
public final R eq(T other) {
expr().eq(_name, other);
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.
*/
public final R equalTo(T other) {
return eq(other);
}
/**
* Is not equal to by ID property.
*/
public final R ne(T other) {
expr().ne(_name, other);
return _root;
}
/**
* Is not equal to by ID property.
*/
public final R notEqualTo(T other) {
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;
}
}
@@ -1,6 +1,5 @@
package io.ebean.typequery;
import io.avaje.lang.Nullable;
import io.ebean.ExpressionList;
import io.ebean.FetchConfig;
import io.ebean.FetchGroup;
@@ -8,18 +7,18 @@ 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;
/**
* Base type for associated beans.
* Base type for associated beans that are not embeddable.
*
* @param <T> the entity bean type (normal entity bean type e.g. Customer)
* @param <R> the specific root query bean type (e.g. QCustomer)
* @param <QB> the query bean type
*/
@SuppressWarnings("rawtypes")
public abstract class TQAssocBean<T, R> extends TQProperty<R, Object> {
public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
private static final FetchConfig FETCH_DEFAULT = FetchConfig.ofDefault();
private static final FetchConfig FETCH_QUERY = FetchConfig.ofQuery();
@@ -110,38 +109,37 @@ public abstract class TQAssocBean<T, R> extends TQProperty<R, Object> {
}
/**
* Eagerly fetch this association fetching some of the properties.
* Eagerly fetch this association loading the specified properties.
*/
@SafeVarargs
protected final R fetchProperties(TQProperty<?, ?>... props) {
return fetchWithProperties(FETCH_DEFAULT, props);
@SafeVarargs @SuppressWarnings("varargs")
public final R fetch(TQProperty<QB,?>... properties) {
return fetchWithProperties(FETCH_DEFAULT, properties);
}
/**
* Eagerly fetch query this association fetching some of the properties.
* Eagerly fetch this association using a 'query join' loading the specified properties.
*/
@SafeVarargs
protected final R fetchQueryProperties(TQProperty<?, ?>... props) {
return fetchWithProperties(FETCH_QUERY, props);
@SafeVarargs @SuppressWarnings("varargs")
public final R fetchQuery(TQProperty<QB,?>... properties) {
return fetchWithProperties(FETCH_QUERY, properties);
}
/**
* Eagerly fetch this association using L2 bean cache.
* Eagerly fetch this association using L2 cache.
*/
@SafeVarargs
protected final R fetchCacheProperties(TQProperty<?, ?>... props) {
return fetchWithProperties(FETCH_CACHE, props);
@SafeVarargs @SuppressWarnings("varargs")
public final R fetchCache(TQProperty<QB,?>... properties) {
return fetchWithProperties(FETCH_CACHE, properties);
}
/**
* Eagerly fetch query this association fetching some of the properties.
* Use lazy loading for this association loading the specified properties.
*/
@SafeVarargs
protected final R fetchLazyProperties(TQProperty<?, ?>... props) {
return fetchWithProperties(FETCH_LAZY, props);
@SafeVarargs @SuppressWarnings("varargs")
public final R fetchLazy(TQProperty<QB,?>... properties) {
return fetchWithProperties(FETCH_LAZY, properties);
}
@SafeVarargs
private R fetchWithProperties(FetchConfig config, TQProperty<?, ?>... props) {
spiQuery().fetchProperties(_name, properties(props), config);
return _root;
@@ -178,7 +176,6 @@ public abstract class TQAssocBean<T, R> extends TQProperty<R, Object> {
return (SpiQueryFetch) ((TQRootBean) _root).query();
}
@SafeVarargs
private Set<String> properties(TQProperty<?, ?>... props) {
Set<String> set = new LinkedHashSet<>();
for (TQProperty<?, ?> prop : props) {
@@ -187,135 +184,6 @@ public abstract class TQAssocBean<T, R> extends TQProperty<R, Object> {
return set;
}
/**
* Is equal to by ID property.
*/
public final R eq(T other) {
expr().eq(_name, other);
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.
*/
public final R equalTo(T other) {
return eq(other);
}
/**
* Is not equal to by ID property.
*/
public final R ne(T other) {
expr().ne(_name, other);
return _root;
}
/**
* Is not equal to by ID property.
*/
public final R notEqualTo(T other) {
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.
@@ -2,15 +2,22 @@ package org.example.domain;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
@Inheritance
@DiscriminatorValue("CAT")
@Entity
public class ACat extends Animal {
private String catProp;
public ACat(String name) {
super(name);
}
public String getCatProp() {
return catProp;
}
public void setCatProp(String catProp) {
this.catProp = catProp;
}
}
@@ -0,0 +1,23 @@
package org.example.domain;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
@DiscriminatorValue("SCAT")
@Entity
public class ASuperCat extends ACat {
private String superCat;
public ASuperCat(String name) {
super(name);
}
public String getSuperCat() {
return superCat;
}
public void setSuperCat(String superCat) {
this.superCat = superCat;
}
}
@@ -0,0 +1,54 @@
package org.querytest;
import org.example.domain.ACat;
import org.example.domain.ADog;
import org.example.domain.Animal;
import org.example.domain.query.QACat;
import org.example.domain.query.QASuperCat;
import org.example.domain.query.QAnimal;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
class InheritanceTest {
@Test
void query_setInheritType() {
ACat cat = new ACat("C1");
cat.save();
ACat cat2 = new ACat("C2");
cat2.save();
ADog dog = new ADog("D1", "D878");
dog.save();
List<Animal> animals = new QAnimal()
.id.greaterOrEqualTo(1L)
.setInheritType(ACat.class)
.findList();
assertThat(animals).isNotEmpty();
}
@Test
void query_onInheritedProperty() {
new QACat()
.name.eq("foo")
.catProp.eq("foo")
.findList();
}
@Test
void query_onInheritedProperty_whenParentOnlyHasDiscriminator() {
// the .name and .catProp properties exist on QASuperCat()
new QASuperCat()
.superCat.eq("foo")
.name.eq("foo")
.catProp.eq("foo")
.findList();
}
}
@@ -591,25 +591,7 @@ public class QCustomerTest {
.findList();
}
@Test
public void query_setInheritType() {
ACat cat = new ACat("C1");
cat.save();
ACat cat2 = new ACat("C2");
cat2.save();
ADog dog = new ADog("D1", "D878");
dog.save();
List<Animal> animals = new QAnimal()
.id.greaterOrEqualTo(1L)
.setInheritType(ACat.class)
.findList();
System.out.println(animals);
}
@Test
public void select_assocManyToOne() {
+6 -6
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-redis</artifactId>
@@ -22,35 +22,35 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<name>ebean test</name>
@@ -28,20 +28,20 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -118,28 +118,28 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-joda-time</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-jsonnode</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-jackson-mapper</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-all</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
+6 -6
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<name>kotlin querybean generator</name>
@@ -29,7 +29,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-querybean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
@@ -43,7 +43,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
@@ -64,14 +64,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-ddl-generator</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
@@ -113,7 +113,7 @@
<annotationProcessorPath>
<groupId>io.ebean</groupId>
<artifactId>kotlin-querybean-generator</artifactId>
<version>13.13.0</version>
<version>13.13.3-RC1</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
@@ -7,6 +7,7 @@ interface Constants {
String GENERATED = "io.ebean.typequery.Generated";
String MAPPED_SUPERCLASS = "javax.persistence.MappedSuperclass";
String DISCRIMINATOR_VALUE = "javax.persistence.DiscriminatorValue";
String INHERITANCE = "javax.persistence.Inheritance";
String ENTITY = "javax.persistence.Entity";
String EMBEDDABLE = "javax.persistence.Embeddable";
@@ -19,6 +20,7 @@ interface Constants {
String DBNAME = "io.ebean.annotation.DbName";
String TQROOTBEAN = "io.ebean.typequery.TQRootBean";
String TQASSOC = "io.ebean.typequery.TQAssoc";
String TQASSOCBEAN = "io.ebean.typequery.TQAssocBean";
String TQPROPERTY = "io.ebean.typequery.TQProperty";
String TYPEQUERYBEAN = "io.ebean.typequery.TypeQueryBean";
@@ -9,7 +9,7 @@ class KotlinLangAdapter implements LangAdapter {
@Override
public void beginAssocClass(Append writer, String shortName, String origShortName) {
writer.append("class Q%s<R> : TQAssocBean<%s,R> {", shortName, origShortName).eol();
// writer.append("class Q%s<R> : TQAssocBean<%s,R> {", shortName, origShortName).eol();
}
@Override
@@ -224,7 +224,7 @@ class ProcessingContext implements Constants {
}
private boolean isMappedSuperOrInheritance(Element mappedSuper) {
return hasAnnotations(mappedSuper, MAPPED_SUPERCLASS, INHERITANCE);
return hasAnnotations(mappedSuper, MAPPED_SUPERCLASS, INHERITANCE, DISCRIMINATOR_VALUE);
}
private boolean isEntityOrEmbedded(Element mappedSuper) {
@@ -236,7 +236,11 @@ class SimpleQueryBeanWriter {
importTypes.remove(Constants.DATABASE);
importTypes.remove(Constants.FETCHGROUP);
importTypes.remove(Constants.QUERY);
importTypes.add(Constants.TQASSOCBEAN);
if (embeddable) {
importTypes.add(Constants.TQASSOC);
} else {
importTypes.add(Constants.TQASSOCBEAN);
}
if (isEntity()) {
importTypes.add(Constants.TQPROPERTY);
importTypes.add(origDestPackage + ".Q" + origShortName);
@@ -280,7 +284,6 @@ 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.");
@@ -340,7 +343,11 @@ class SimpleQueryBeanWriter {
writer.append(" */").eol();
writer.append(Constants.AT_GENERATED).eol();
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
lang().beginAssocClass(writer, shortName, shortInnerName);
if (embeddable) {
writer.append("class Q%s<R> : TQAssoc<%s,R> {", shortName, shortInnerName).eol();
} else {
writer.append("class Q%s<R> : TQAssocBean<%s,R,Q%s> {", shortName, shortInnerName, origShortName).eol();
}
} else {
writer.append("/**").eol();
+14 -14
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-all</artifactId>
@@ -14,67 +14,67 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-clickhouse</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-db2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hana</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-hsqldb</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mariadb</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-nuodb</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-oracle</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-postgres</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlanywhere</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlite</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-sqlserver</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-clickhouse</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-db2</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-h2</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-hana</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-hsqldb</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-h2</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+3 -3
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-mariadb</artifactId>
@@ -14,13 +14,13 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-platform-mysql</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-mysql</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-nuodb</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-oracle</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>platforms</artifactId>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-postgres</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-sqlanywhere</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-sqlite</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
</dependencies>
+2 -2
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>platforms</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>ebean-platform-sqlserver</artifactId>
@@ -14,7 +14,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-api</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
+3 -3
View File
@@ -9,7 +9,7 @@
<groupId>io.ebean</groupId>
<artifactId>ebean-parent</artifactId>
<version>13.13.2</version>
<version>13.14.0</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.2</ebean-agent.version>
<ebean-maven-plugin.version>13.13.2</ebean-maven-plugin.version>
<ebean-agent.version>13.14.0</ebean-agent.version>
<ebean-maven-plugin.version>13.14.0</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.2</version>
<version>13.14.0</version>
</parent>
<name>querybean generator</name>
@@ -8,6 +8,7 @@ interface Constants {
String GENERATED = "io.ebean.typequery.Generated";
String MAPPED_SUPERCLASS = "javax.persistence.MappedSuperclass";
String DISCRIMINATOR_VALUE = "javax.persistence.DiscriminatorValue";
String INHERITANCE = "javax.persistence.Inheritance";
String ENTITY = "javax.persistence.Entity";
String EMBEDDABLE = "javax.persistence.Embeddable";
@@ -20,6 +21,7 @@ interface Constants {
String DBNAME = "io.ebean.annotation.DbName";
String TQROOTBEAN = "io.ebean.typequery.TQRootBean";
String TQASSOC = "io.ebean.typequery.TQAssoc";
String TQASSOCBEAN = "io.ebean.typequery.TQAssocBean";
String TQPROPERTY = "io.ebean.typequery.TQProperty";
String TYPEQUERYBEAN = "io.ebean.typequery.TypeQueryBean";
@@ -181,7 +181,7 @@ class ProcessingContext implements Constants {
}
private boolean isMappedSuperOrInheritance(Element mappedSuper) {
return hasAnnotations(mappedSuper, MAPPED_SUPERCLASS, INHERITANCE);
return hasAnnotations(mappedSuper, MAPPED_SUPERCLASS, INHERITANCE, DISCRIMINATOR_VALUE);
}
private boolean isEntityOrEmbedded(Element mappedSuper) {
@@ -117,7 +117,6 @@ class SimpleQueryBeanWriter {
* Write the type query bean (root bean).
*/
void writeRootBean() throws IOException {
gatherPropertyDetails();
if (isEmbeddable()) {
processingContext.addEntity(beanFullName, dbName);
@@ -170,7 +169,11 @@ class SimpleQueryBeanWriter {
importTypes.remove(Constants.DATABASE);
importTypes.remove(Constants.FETCHGROUP);
importTypes.remove(Constants.QUERY);
importTypes.add(Constants.TQASSOCBEAN);
if (embeddable) {
importTypes.add(Constants.TQASSOC);
} else {
importTypes.add(Constants.TQASSOCBEAN);
}
if (isEntity()) {
importTypes.add(Constants.TQPROPERTY);
importTypes.add(origDestPackage + ".Q" + origShortName);
@@ -288,10 +291,7 @@ class SimpleQueryBeanWriter {
private void writeAssocBeanFetch() {
if (isEntity()) {
writeAssocBeanFetch("", "Eagerly fetch this association loading the specified properties.");
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.");
// inherit the fetch methods
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.");
@@ -367,8 +367,11 @@ class SimpleQueryBeanWriter {
writer.append(" */").eol();
writer.append(Constants.AT_GENERATED).eol();
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
writer.append("public class Q%s<R> extends TQAssocBean<%s,R> {", shortName, shortInnerName).eol();
if (embeddable) {
writer.append("public final class Q%s<R> extends TQAssoc<%s,R> {", shortName, shortInnerName).eol();
} else {
writer.append("public final class Q%s<R> extends TQAssocBean<%s,R,Q%s> {", shortName, shortInnerName, origShortName).eol();
}
} else {
writer.append("/**").eol();
writer.append(" * Query bean for %s.", shortName).eol();
@@ -377,7 +380,7 @@ class SimpleQueryBeanWriter {
writer.append(" */").eol();
writer.append(Constants.AT_GENERATED).eol();
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
writer.append("public class Q%s extends TQRootBean<%1$s,Q%1$s> {", shortName).eol();
writer.append("public final class Q%s extends TQRootBean<%1$s,Q%1$s> {", shortName).eol();
}
writer.eol();
@@ -420,7 +423,6 @@ class SimpleQueryBeanWriter {
* Write all the imports.
*/
private void writeImports() {
for (String importType : importTypes) {
writer.append("import %s;", importType).eol();
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>ebean-parent</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>tests</artifactId>
+5 -5
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>tests</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>test-java16</artifactId>
@@ -18,7 +18,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -30,7 +30,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
@@ -52,7 +52,7 @@
<path>
<groupId>io.ebean</groupId>
<artifactId>querybean-generator</artifactId>
<version>13.13.1</version>
<version>13.13.3-SNAPSHOT</version>
</path>
</annotationProcessorPaths>
</configuration>
@@ -65,7 +65,7 @@
<extensions>true</extensions>
<configuration>
<tiles>
<tile>io.ebean.tile:enhancement:13.12.0</tile>
<tile>io.ebean.tile:enhancement:13.13.2</tile>
</tiles>
</configuration>
</plugin>
+4 -4
View File
@@ -6,7 +6,7 @@
<parent>
<artifactId>tests</artifactId>
<groupId>io.ebean</groupId>
<version>13.13.2</version>
<version>13.14.0</version>
</parent>
<artifactId>test-kotlin</artifactId>
@@ -24,7 +24,7 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
</dependency>
<dependency>
@@ -37,14 +37,14 @@
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-test</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.ebean</groupId>
<artifactId>ebean-core</artifactId>
<version>13.13.2</version>
<version>13.14.0</version>
<scope>test</scope>
</dependency>