mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60a84b7a38 | ||
|
|
fa3e9e6fc6 | ||
|
|
8ca44edf9c | ||
|
|
fcefd94086 | ||
|
|
70e5d57b7e | ||
|
|
cc3b9c9508 | ||
|
|
be49be38d0 | ||
|
|
dca13db945 | ||
|
|
bd318a5d85 | ||
|
|
4c2be2986a | ||
|
|
3d7bebd244 | ||
|
|
e23bbf5f94 | ||
|
|
27b0c33a4b | ||
|
|
53ef159d06 | ||
|
|
a7d778d98b | ||
|
|
19580ff83d | ||
|
|
a79a44c513 | ||
|
|
184b82e1b2 | ||
|
|
04e935acd0 | ||
|
|
142ffe925c | ||
|
|
395505ec0d |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-clickhouse</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-cockroach</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-db2</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-h2</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-hana</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mariadb</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-mysql</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-nuodb</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-oracle</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-postgres</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlite</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-sqlserver</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean-yugabyte</name>
|
||||
@@ -16,13 +16,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -35,13 +35,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>composites</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean (all platforms)</name>
|
||||
@@ -16,31 +16,31 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -53,13 +53,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
|
||||
@@ -24,6 +24,11 @@ public class InterceptReadOnly implements EntityBeanIntercept {
|
||||
this.owner = (EntityBean) ownerBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InterceptReadOnly{" + owner + '}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityBean getOwner() {
|
||||
return owner;
|
||||
|
||||
@@ -113,6 +113,25 @@ public final class InterceptReadWrite implements EntityBeanIntercept {
|
||||
this.flags = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InterceptReadWrite{state=" + state +
|
||||
(dirty ? " dirty;" : "") +
|
||||
(forceUpdate ? " forceUpdate;" : "") +
|
||||
(readOnly ? " readOnly;" : "") +
|
||||
(disableLazyLoad ? " disableLazyLoad;" : "") +
|
||||
(lazyLoadFailure ? " lazyLoadFailure;" : "") +
|
||||
(fullyLoadedBean ? " fullyLoadedBean;" : "") +
|
||||
(loadedFromCache ? " loadedFromCache;" : "") +
|
||||
", pc=" + System.identityHashCode(persistenceContext) +
|
||||
", flags=" + Arrays.toString(flags) +
|
||||
(lazyLoadProperty > -1 ? (", lazyLoadProperty=" + lazyLoadProperty) : "") +
|
||||
", loader=" + beanLoader +
|
||||
(ownerId != null ? (", ownerId=" + ownerId) : "") +
|
||||
", owner=" + owner +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityBean getOwner() {
|
||||
return owner;
|
||||
@@ -718,7 +737,7 @@ public final class InterceptReadWrite implements EntityBeanIntercept {
|
||||
}
|
||||
if (lazyLoadFailure) {
|
||||
// failed when batch lazy loaded by another bean in the batch
|
||||
throw new EntityNotFoundException("(Lazy) loading failed on type:" + owner.getClass().getName() + " id:" + ownerId + " - Bean has been deleted");
|
||||
throw new EntityNotFoundException("(Lazy) loading failed on type:" + owner.getClass().getName() + " id:" + ownerId + " - Bean has been deleted. BeanLoader: " + beanLoader);
|
||||
}
|
||||
if (lazyLoadProperty == -1) {
|
||||
lazyLoadProperty = loadProperty;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
@@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+30
-30
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -89,112 +89,112 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- platforms -->
|
||||
@@ -202,67 +202,67 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-clickhouse</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-db2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-hana</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mariadb</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mysql</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-nuodb</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-oracle</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgres</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlite</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlserver</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+7
-7
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -46,13 +46,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -143,21 +143,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@ public final class LoadBeanRequest extends LoadRequest {
|
||||
/**
|
||||
* Return the list of Id values for the beans in the lazy load buffer.
|
||||
*/
|
||||
public List<Object> getIdList() {
|
||||
List<Object> idList = new ArrayList<>();
|
||||
BeanDescriptor<?> desc = loadBuffer.descriptor();
|
||||
public List<Object> ids() {
|
||||
final List<Object> idList = new ArrayList<>(batch.size());
|
||||
final BeanDescriptor<?> desc = loadBuffer.descriptor();
|
||||
for (EntityBeanIntercept ebi : batch) {
|
||||
idList.add(desc.getId(ebi.getOwner()));
|
||||
}
|
||||
@@ -111,6 +111,7 @@ public final class LoadBeanRequest extends LoadRequest {
|
||||
desc.cacheBeanPutAll(list);
|
||||
}
|
||||
if (lazyLoadProperty != null) {
|
||||
List<EntityBeanIntercept> missed = new ArrayList<>();
|
||||
Set<Object> missedIds = new HashSet<>();
|
||||
for (EntityBeanIntercept ebi : batch) {
|
||||
// check if the underlying row in DB was deleted. Mark the bean as 'failed' if
|
||||
@@ -120,23 +121,26 @@ public final class LoadBeanRequest extends LoadRequest {
|
||||
// assume this is logically deleted (hence not found)
|
||||
desc.markAsDeleted(ebi.getOwner());
|
||||
missedIds.add(id);
|
||||
missed.add(ebi);
|
||||
}
|
||||
}
|
||||
return new Result(loadedIds, missedIds);
|
||||
return new Result(loadedIds, missedIds, missed);
|
||||
}
|
||||
return EMPTY_RESULT;
|
||||
}
|
||||
|
||||
static final Result EMPTY_RESULT = new Result(Collections.emptySet(),Collections.emptySet());
|
||||
static final Result EMPTY_RESULT = new Result(Collections.emptySet(),Collections.emptySet(), Collections.emptyList());
|
||||
|
||||
public static class Result {
|
||||
|
||||
private final Set<Object> loadedIds;
|
||||
private final Set<Object> missedIds;
|
||||
private final List<EntityBeanIntercept> missed;
|
||||
|
||||
Result(Set<Object> loadedIds, Set<Object> missedIds) {
|
||||
Result(Set<Object> loadedIds, Set<Object> missedIds, List<EntityBeanIntercept> missed) {
|
||||
this.loadedIds = loadedIds;
|
||||
this.missedIds = missedIds;
|
||||
this.missed = missed;
|
||||
}
|
||||
|
||||
public boolean markedDeleted() {
|
||||
@@ -150,5 +154,9 @@ public final class LoadBeanRequest extends LoadRequest {
|
||||
public Set<Object> loadedIds() {
|
||||
return loadedIds;
|
||||
}
|
||||
|
||||
public List<EntityBeanIntercept> missed() {
|
||||
return missed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,5 +34,5 @@ public interface SpiJsonReader {
|
||||
|
||||
Object readValueUsingObjectMapper(Class<?> propertyType) throws IOException;
|
||||
|
||||
boolean intercept();
|
||||
boolean update();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static java.lang.System.Logger.Level.*;
|
||||
import static java.lang.System.Logger.Level.DEBUG;
|
||||
import static java.lang.System.Logger.Level.ERROR;
|
||||
|
||||
/**
|
||||
* Helper to handle lazy loading and refreshing of beans.
|
||||
@@ -125,23 +126,26 @@ final class DefaultBeanLoader {
|
||||
* Load a batch of beans for +query or +lazy loading.
|
||||
*/
|
||||
void loadBean(LoadBeanRequest loadRequest) {
|
||||
Set<EntityBeanIntercept> batch = loadRequest.batch();
|
||||
final Set<EntityBeanIntercept> batch = loadRequest.batch();
|
||||
if (batch.isEmpty()) {
|
||||
throw new RuntimeException("Nothing in batch?");
|
||||
}
|
||||
|
||||
List<Object> idList = loadRequest.getIdList();
|
||||
if (idList.isEmpty()) {
|
||||
// everything was loaded from cache
|
||||
final List<Object> ids = loadRequest.ids();
|
||||
if (ids.isEmpty()) {
|
||||
// this should never happen given the batch is not empty
|
||||
CoreLog.internal.log(ERROR, "No Ids when loading Batch buffer");
|
||||
return;
|
||||
}
|
||||
|
||||
SpiQuery<?> query = server.createQuery(loadRequest.beanType());
|
||||
loadRequest.configureQuery(query, idList);
|
||||
final SpiQuery<?> query = server.createQuery(loadRequest.beanType());
|
||||
loadRequest.configureQuery(query, ids);
|
||||
final List<?> list = executeQuery(loadRequest, query);
|
||||
final LoadBeanRequest.Result result = loadRequest.postLoad(list);
|
||||
if (result.markedDeleted() && CoreLog.markedAsDeleted.isLoggable(DEBUG)) {
|
||||
String msg = MessageFormat.format("Loaded bean marked as deleted for {0} missedIds:{1} loadedIds:{2} sql:{3} list:{4}", loadRequest.beanType(), result.missedIds(), result.loadedIds(), query.getGeneratedSql(), list);
|
||||
CoreLog.markedAsDeleted.log(DEBUG, "Loaded bean batch {0}", batch);
|
||||
String msg = MessageFormat.format("Loaded bean marked as deleted for {0} ids:{1} missedIds:{2} loadedIds:{3} sql:{4} loadedList:{5} missed:{6}",
|
||||
loadRequest.beanType(), ids, result.missedIds(), result.loadedIds(), query.getGeneratedSql(), list, result.missed());
|
||||
CoreLog.markedAsDeleted.log(DEBUG, msg, new RuntimeException("LoadBeanRequest markedAsDeleted"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -962,13 +962,15 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
|
||||
if (transaction == null) {
|
||||
transaction = currentServerTransaction();
|
||||
}
|
||||
query.setDefaultRawSqlIfRequired();
|
||||
if (query.isAutoTunable() && !autoTuneService.tuneQuery(query)) {
|
||||
// use deployment FetchType.LAZY/EAGER annotations
|
||||
// to define the 'default' select clause
|
||||
query.setDefaultSelectClause();
|
||||
if (!query.isRawSql()) {
|
||||
query.setDefaultRawSqlIfRequired();
|
||||
if (query.isAutoTunable() && !autoTuneService.tuneQuery(query)) {
|
||||
// use deployment FetchType.LAZY/EAGER annotations
|
||||
// to define the 'default' select clause
|
||||
query.setDefaultSelectClause();
|
||||
}
|
||||
query.selectAllForLazyLoadProperty();
|
||||
}
|
||||
query.selectAllForLazyLoadProperty();
|
||||
ProfileLocation profileLocation = query.getProfileLocation();
|
||||
if (profileLocation != null) {
|
||||
profileLocation.obtain();
|
||||
|
||||
@@ -133,7 +133,12 @@ final class BeanDescriptorJsonHelp<T> {
|
||||
String key = parser.getCurrentName();
|
||||
BeanProperty p = desc.beanProperty(key);
|
||||
if (p != null) {
|
||||
p.jsonRead(readJson, bean);
|
||||
if (p.isVersion() && readJson.update() ) {
|
||||
// skip version prop during update
|
||||
p.jsonRead(readJson);
|
||||
} else {
|
||||
p.jsonRead(readJson, bean);
|
||||
}
|
||||
} else {
|
||||
// read an unmapped property
|
||||
if (unmappedProperties == null) {
|
||||
|
||||
@@ -20,9 +20,9 @@ import io.ebeaninternal.api.SpiExpressionRequest;
|
||||
import io.ebeaninternal.api.SpiQuery;
|
||||
import io.ebeaninternal.api.json.SpiJsonReader;
|
||||
import io.ebeaninternal.api.json.SpiJsonWriter;
|
||||
import io.ebeaninternal.server.bind.DataBind;
|
||||
import io.ebeaninternal.server.core.EncryptAlias;
|
||||
import io.ebeaninternal.server.core.InternString;
|
||||
import io.ebeaninternal.server.bind.DataBind;
|
||||
import io.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty;
|
||||
import io.ebeaninternal.server.deploy.generatedproperty.GeneratedWhenCreated;
|
||||
import io.ebeaninternal.server.deploy.generatedproperty.GeneratedWhenModified;
|
||||
@@ -1408,15 +1408,20 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
}
|
||||
|
||||
public void jsonRead(SpiJsonReader ctx, EntityBean bean) throws IOException {
|
||||
Object objValue = jsonRead(ctx);
|
||||
if (jsonDeserialize) {
|
||||
if (ctx.update()) {
|
||||
setValueIntercept(bean, objValue);
|
||||
} else {
|
||||
setValue(bean, objValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Object jsonRead(SpiJsonReader ctx) throws IOException {
|
||||
JsonToken event = ctx.nextToken();
|
||||
if (JsonToken.VALUE_NULL == event) {
|
||||
if (jsonDeserialize) {
|
||||
if (ctx.intercept()) {
|
||||
setValueIntercept(bean, null);
|
||||
} else {
|
||||
setValue(bean, null);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
// expect to read non-null json value
|
||||
Object objValue;
|
||||
@@ -1433,13 +1438,7 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
CoreLog.log.log(ERROR, msg, e);
|
||||
}
|
||||
}
|
||||
if (jsonDeserialize) {
|
||||
if (ctx.intercept()) {
|
||||
setValueIntercept(bean, objValue);
|
||||
} else {
|
||||
setValue(bean, objValue);
|
||||
}
|
||||
}
|
||||
return objValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package io.ebeaninternal.server.deploy;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import io.ebean.SqlUpdate;
|
||||
import io.ebean.Transaction;
|
||||
import io.ebean.bean.BeanCollection;
|
||||
@@ -27,6 +29,7 @@ import java.io.StringWriter;
|
||||
import java.util.*;
|
||||
|
||||
import static java.lang.System.Logger.Level.ERROR;
|
||||
import static java.lang.System.Logger.Level.WARNING;
|
||||
|
||||
/**
|
||||
* Property mapped to a List Set or Map.
|
||||
@@ -937,7 +940,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
if (elementDescriptor != null) {
|
||||
elementDescriptor.jsonWriteMapEntry(ctx, entry);
|
||||
} else {
|
||||
targetDescriptor.jsonWrite(ctx, (EntityBean)entry.getValue());
|
||||
targetDescriptor.jsonWrite(ctx, (EntityBean) entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1003,7 +1006,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
if (JsonToken.VALUE_NULL == event) {
|
||||
return null;
|
||||
}
|
||||
return jsonReadCollection(ctx, null);
|
||||
return jsonReadCollection(ctx, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1016,15 +1019,16 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
/**
|
||||
* Read the collection (JSON Array) containing entity beans.
|
||||
*/
|
||||
public Object jsonReadCollection(SpiJsonReader readJson, EntityBean parentBean) throws IOException {
|
||||
public Object jsonReadCollection(SpiJsonReader readJson, EntityBean parentBean, Object targets) throws IOException {
|
||||
if (elementDescriptor != null && elementDescriptor.isJsonReadCollection()) {
|
||||
return elementDescriptor.jsonReadCollection(readJson, parentBean);
|
||||
}
|
||||
BeanCollection<?> collection = createEmpty(parentBean);
|
||||
BeanCollectionAdd add = beanCollectionAdd(collection);
|
||||
Map<Object, T> existingBeans = extractBeans(targets);
|
||||
do {
|
||||
// CHECKME: Update existing list entry here?
|
||||
EntityBean detailBean = (EntityBean) targetDescriptor.jsonRead(readJson, name, null);
|
||||
|
||||
EntityBean detailBean = getDetailBean(readJson, existingBeans);
|
||||
if (detailBean == null) {
|
||||
// read the entire array
|
||||
break;
|
||||
@@ -1039,6 +1043,63 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
return collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find bean in the target collection and reuse it for JSON update.
|
||||
*/
|
||||
private EntityBean getDetailBean(SpiJsonReader readJson, Map<Object, T> targets) throws IOException {
|
||||
BeanProperty idProperty = targetDescriptor.idProperty();
|
||||
if (targets == null || idProperty == null) {
|
||||
return (EntityBean) targetDescriptor.jsonRead(readJson, name, null);
|
||||
} else {
|
||||
JsonToken token = readJson.parser().nextToken();
|
||||
if (JsonToken.VALUE_NULL == token || JsonToken.END_ARRAY == token) {
|
||||
return null;
|
||||
}
|
||||
// extract the id. We have to buffer the JSON;
|
||||
ObjectNode node = readJson.mapper().readTree(readJson.parser());
|
||||
SpiJsonReader jsonReader = readJson.forJson(node.traverse());
|
||||
JsonNode idNode = node.get(idProperty.name());
|
||||
Object id = idNode == null ? null : idProperty.jsonRead(readJson.forJson(idNode.traverse()));
|
||||
return (EntityBean) targetDescriptor.jsonRead(jsonReader, name, targets.get(id));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract beans, that are currently in the target collection. (targets can be a List/Set/Map)
|
||||
*/
|
||||
private Map<Object, T> extractBeans(Object targets) {
|
||||
Collection<T> beans;
|
||||
|
||||
if (targets == null) {
|
||||
return null;
|
||||
} else if (targets instanceof Map) {
|
||||
if (((Map<?, T>) targets).isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
beans = ((Map<?, T>) targets).values();
|
||||
} else if (targets instanceof Collection) {
|
||||
if (((Collection<?>) targets).isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
beans = (Collection<T>) targets;
|
||||
} else {
|
||||
CoreLog.log.log(WARNING, "Found non collection value " + targets.getClass().getSimpleName());
|
||||
return null;
|
||||
}
|
||||
|
||||
BeanProperty idProp = targetDescriptor.idProperty();
|
||||
Map<Object, T> ret = new HashMap<>();
|
||||
for (T bean : beans) {
|
||||
if (bean instanceof EntityBean) {
|
||||
Object id = idProp.getValue((EntityBean) bean);
|
||||
if (id != null) {
|
||||
ret.put(id, bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret.isEmpty() ? null : ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind all the property values to the SqlUpdate.
|
||||
*/
|
||||
|
||||
+3
-3
@@ -50,10 +50,10 @@ class BeanPropertyAssocManyJsonHelp {
|
||||
if (JsonToken.START_ARRAY != event && JsonToken.START_OBJECT != event) {
|
||||
throw new JsonParseException(parser, "Unexpected token " + event + " - expecting start array or object");
|
||||
}
|
||||
if (readJson.intercept()) {
|
||||
many.setValueIntercept(parentBean, many.jsonReadCollection(readJson, parentBean));
|
||||
if (readJson.update()) {
|
||||
many.setValueIntercept(parentBean, many.jsonReadCollection(readJson, parentBean, many.value(parentBean)));
|
||||
} else {
|
||||
many.setValue(parentBean, many.jsonReadCollection(readJson, parentBean));
|
||||
many.setValue(parentBean, many.jsonReadCollection(readJson, parentBean, null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -787,9 +787,10 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
@Override
|
||||
public void jsonRead(SpiJsonReader readJson, EntityBean bean) throws IOException {
|
||||
if (jsonDeserialize && targetDescriptor != null) {
|
||||
T target = (T) value(bean);
|
||||
// CHECKME: may we skip reading the object from the json stream?
|
||||
T target = readJson.update() ? (T) value(bean) : null;
|
||||
T assocBean = targetDescriptor.jsonRead(readJson, name, target);
|
||||
if (readJson.intercept()) {
|
||||
if (readJson.update()) {
|
||||
setValueIntercept(bean, assocBean);
|
||||
} else {
|
||||
setValue(bean, assocBean);
|
||||
@@ -797,6 +798,11 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object jsonRead(SpiJsonReader readJson) throws IOException {
|
||||
return targetDescriptor.jsonRead(readJson, name, null);
|
||||
}
|
||||
|
||||
public boolean isReference(Object detailBean) {
|
||||
EntityBean eb = (EntityBean) detailBean;
|
||||
return targetDescriptor.isReference(eb._ebean_getIntercept());
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public final class BeanPropertySimpleCollection<T> extends BeanPropertyAssocMany
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object jsonReadCollection(SpiJsonReader readJson, EntityBean parentBean) throws IOException {
|
||||
public Object jsonReadCollection(SpiJsonReader readJson, EntityBean parentBean, Object collectionValue) throws IOException {
|
||||
return elementDescriptor.jsonReadCollection(readJson, parentBean);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,13 +32,13 @@ public final class ReadJson implements SpiJsonReader {
|
||||
private final Object objectMapper;
|
||||
private final PersistenceContext persistenceContext;
|
||||
private final LoadContext loadContext;
|
||||
private final boolean intercept;
|
||||
private final boolean update;
|
||||
private final boolean enableLazyLoading;
|
||||
|
||||
/**
|
||||
* Construct with parser and readOptions.
|
||||
*/
|
||||
public ReadJson(BeanDescriptor<?> desc, JsonParser parser, JsonReadOptions readOptions, Object objectMapper, boolean intercept) {
|
||||
public ReadJson(BeanDescriptor<?> desc, JsonParser parser, JsonReadOptions readOptions, Object objectMapper, boolean update) {
|
||||
this.rootDesc = desc;
|
||||
this.parser = parser;
|
||||
this.objectMapper = objectMapper;
|
||||
@@ -48,7 +48,7 @@ public final class ReadJson implements SpiJsonReader {
|
||||
// only create visitorMap, pathStack if needed ...
|
||||
this.visitorMap = (readOptions == null) ? null : readOptions.getVisitorMap();
|
||||
this.pathStack = (visitorMap == null && loadContext == null) ? null : new PathStack();
|
||||
this.intercept = intercept;
|
||||
this.update = update;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,7 @@ public final class ReadJson implements SpiJsonReader {
|
||||
this.objectMapper = source.objectMapper;
|
||||
this.persistenceContext = source.persistenceContext;
|
||||
this.loadContext = source.loadContext;
|
||||
this.intercept = source.intercept;
|
||||
this.update = source.update;
|
||||
this.enableLazyLoading = source.enableLazyLoading;
|
||||
}
|
||||
|
||||
@@ -213,10 +213,10 @@ public final class ReadJson implements SpiJsonReader {
|
||||
}
|
||||
|
||||
/**
|
||||
* Do we have to set values via intercept or not.
|
||||
* Do we update an existing bean? This meeans we have to set values via intercept and handle collections.
|
||||
*/
|
||||
@Override
|
||||
public boolean intercept() {
|
||||
return intercept;
|
||||
public boolean update() {
|
||||
return update;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,11 @@ final class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContext
|
||||
this.batch = new HashSet<>(Math.max((int) (batchSize/.75f) + 1, 16));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "LoadBuffer@" + hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Lock lock() {
|
||||
bufferLock.lock();
|
||||
@@ -186,6 +191,9 @@ final class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContext
|
||||
|
||||
@Override
|
||||
public void loadBean(EntityBeanIntercept ebi) {
|
||||
assert bufferLock.isHeldByCurrentThread();
|
||||
assert bufferLock.isLocked();
|
||||
|
||||
// A lock is effectively held by EntityBeanIntercept.loadBean()
|
||||
if (context.desc.lazyLoadMany(ebi, context)) {
|
||||
// lazy load property was a Many
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-csv-reader</artifactId>
|
||||
@@ -14,21 +14,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean external mapping api</name>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<scm>
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JAVAX-DEPENDENCY-START -->
|
||||
@@ -68,21 +68,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-kotlin</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis</name>
|
||||
@@ -22,14 +22,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -63,21 +63,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -22,35 +22,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+8
-8
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -28,20 +28,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -118,28 +118,28 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-joda-time</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-jsonnode</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import io.ebean.test.containers.SqlServerContainer;
|
||||
public class StartSqlServer {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SqlServerContainer.builder("2019-GA-ubuntu-16.04")
|
||||
SqlServerContainer.builder("2022-RTM-CU2-ubuntu-20.04")
|
||||
.dbName("test_ebean")
|
||||
.user("test_ebean")
|
||||
.build()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.tests.basic;
|
||||
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
import org.tests.model.interfaces.Address;
|
||||
@@ -9,23 +9,18 @@ import org.tests.model.interfaces.IAddress;
|
||||
import org.tests.model.interfaces.IPerson;
|
||||
import org.tests.model.interfaces.Person;
|
||||
|
||||
public class TestManyOneInterface extends BaseTestCase {
|
||||
class TestManyOneInterface extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
void test() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
IAddress a = new Address("hello");
|
||||
|
||||
IPerson p = new Person();
|
||||
|
||||
DB.save(p);
|
||||
IAddress a = new Address("hello", p);
|
||||
p.setDefaultAddress(a);
|
||||
|
||||
DB.save(a);
|
||||
DB.save(p);
|
||||
|
||||
//Assert.assertTrue();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.tests.expression.bitwise;
|
||||
|
||||
import io.ebean.Model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Version;
|
||||
@@ -15,8 +14,6 @@ public class BwBean extends Model {
|
||||
|
||||
String name;
|
||||
|
||||
// sqlserver wants integer type for bitwise AND operator
|
||||
@Column(columnDefinition = "integer")
|
||||
long flags;
|
||||
|
||||
@Version
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.tests.model.interfaces;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Version;
|
||||
|
||||
@Entity
|
||||
@@ -13,10 +14,14 @@ public class Address implements IAddress {
|
||||
@Version
|
||||
private int version;
|
||||
|
||||
@ManyToOne(targetEntity=Person.class, optional=false)
|
||||
private IPerson person;
|
||||
|
||||
private String street;
|
||||
|
||||
public Address(String street) {
|
||||
public Address(String street, IPerson person) {
|
||||
this.street = street;
|
||||
this.person = person;
|
||||
}
|
||||
|
||||
public long getOid() {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package org.tests.model.interfaces;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Version;
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
public class Person implements IPerson {
|
||||
@@ -13,6 +11,8 @@ public class Person implements IPerson {
|
||||
@Version
|
||||
private int version;
|
||||
|
||||
@OneToMany(targetEntity=Address.class)
|
||||
private List<IAddress> addresses;
|
||||
@ManyToOne(targetEntity = Address.class)
|
||||
private IAddress defaultAddress;
|
||||
|
||||
@@ -42,4 +42,11 @@ public class Person implements IPerson {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public List<IAddress> getAddresses() {
|
||||
return addresses;
|
||||
}
|
||||
|
||||
public void setAddresses(List<IAddress> addresses) {
|
||||
this.addresses = addresses;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
package org.tests.model.interfaces;
|
||||
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestTargetEntity extends BaseTestCase {
|
||||
class TestTargetEntity extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
void test() {
|
||||
Person person = setup();
|
||||
|
||||
Persona persona = new Persona("junk");
|
||||
@@ -20,17 +21,48 @@ public class TestTargetEntity extends BaseTestCase {
|
||||
Persona found = DB.find(Persona.class, persona.getId());
|
||||
assertThat(found).isNotNull();
|
||||
assertThat(found.persona()).isEqualTo("junk");
|
||||
assertThat(found.getPerson().getDefaultAddress().getStreet()).isEqualTo("street");
|
||||
IPerson person1 = found.getPerson();
|
||||
IAddress address = person1.getDefaultAddress();
|
||||
assertThat(address.getStreet()).isEqualTo("street");
|
||||
|
||||
person1.setDefaultAddress(null);
|
||||
DB.save(person1);
|
||||
DB.delete(address);
|
||||
DB.delete(persona);
|
||||
DB.delete(person);
|
||||
DB.delete(person.getDefaultAddress());
|
||||
DB.delete(person1);
|
||||
}
|
||||
|
||||
@Test
|
||||
void addresses() {
|
||||
Person p0 = new Person();
|
||||
Person p1 = new Person();
|
||||
DB.saveAll(p0, p1);
|
||||
|
||||
Address address0 = new Address("a0", p0);
|
||||
Address address1 = new Address("a1", p0);
|
||||
Address address2 = new Address("a2", p1);
|
||||
Address address3 = new Address("a3", p1);
|
||||
DB.saveAll(address0, address1, address2, address3);
|
||||
|
||||
p0.setDefaultAddress(address0);
|
||||
p1.setDefaultAddress(address2);
|
||||
DB.saveAll(p0, p1);
|
||||
|
||||
List<Person> list = DB.find(Person.class).findList();
|
||||
for (Person person : list) {
|
||||
IAddress da0 = person.getDefaultAddress();
|
||||
da0.getStreet();
|
||||
}
|
||||
|
||||
list.get(0).getAddresses()
|
||||
.size();
|
||||
}
|
||||
|
||||
private Person setup() {
|
||||
Address address = new Address("street");
|
||||
DB.save(address);
|
||||
Person person = new Person();
|
||||
DB.save(person);
|
||||
Address address = new Address("street", person);
|
||||
DB.save(address);
|
||||
person.setDefaultAddress(address);
|
||||
DB.save(person);
|
||||
return person;
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.ebean.xtest.IgnorePlatform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.Customer;
|
||||
import org.tests.model.basic.Order;
|
||||
import org.tests.model.basic.Phone;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
|
||||
import java.util.List;
|
||||
@@ -17,10 +18,10 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
void test() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select r.id, r.name from o_customer r ")
|
||||
@@ -46,7 +47,33 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFindCount_when_idPropertyNotMapped() {
|
||||
void testWithLimit() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select r.id, r.phone_number from PHONES r where r.phone_number = :num")
|
||||
.columnMapping("r.id", "id")
|
||||
.columnMapping("r.phone_number", "phoneNumber").create();
|
||||
|
||||
Query<Phone> query = DB.find(Phone.class);
|
||||
query.setRawSql(rawSql);
|
||||
query.setParameter("num", "45");
|
||||
query.setMaxRows(1);
|
||||
|
||||
LoggedSql.start();
|
||||
query.findOne();
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(1);
|
||||
if (isLimitOffset()) {
|
||||
assertThat(sql.get(0)).contains("select r.id, r.phone_number from PHONES r where r.phone_number = ? limit 1");
|
||||
} else if (isAnsiSqlLimit()) {
|
||||
assertThat(sql.get(0)).contains("select r.id, r.phone_number from PHONES r where r.phone_number = ? fetch next 1 rows only");
|
||||
} else if (isSqlServer()) {
|
||||
assertThat(sql.get(0)).contains("select top 1 r.id, r.phone_number from PHONES r where r.phone_number = ?");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFindCount_when_idPropertyNotMapped() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
// mapping does not include the id column & property
|
||||
@@ -74,7 +101,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
@IgnorePlatform({Platform.MYSQL, Platform.MARIADB, Platform.SQLSERVER})
|
||||
public void test_upperCaseSql() {
|
||||
void test_upperCaseSql() {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -89,8 +116,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFirstRowsMaxRows() throws InterruptedException, ExecutionException {
|
||||
|
||||
void testFirstRowsMaxRows() throws InterruptedException, ExecutionException {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql =
|
||||
@@ -125,8 +151,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPaging() {
|
||||
|
||||
void testPaging() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select r.id, r.name from o_customer r ")
|
||||
@@ -155,8 +180,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPaging_with_existingRawSqlOrderBy_expect_id_appendToOrderBy() {
|
||||
|
||||
void testPaging_with_existingRawSqlOrderBy_expect_id_appendToOrderBy() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select o.id, o.order_date, o.ship_date from o_order o order by o.ship_date desc")
|
||||
@@ -189,8 +213,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPaging_with_existingRawSqlOrderBy_expect_id_appendToOrderBy_with_id() {
|
||||
|
||||
void testPaging_with_existingRawSqlOrderBy_expect_id_appendToOrderBy_with_id() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select o.id, o.order_date, o.ship_date from o_order o order by o.ship_date desc")
|
||||
@@ -225,8 +248,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
|
||||
@IgnorePlatform(Platform.ORACLE)
|
||||
@Test
|
||||
public void testPaging_when_setOrderBy_expect_id_appendToOrderBy() {
|
||||
|
||||
void testPaging_when_setOrderBy_expect_id_appendToOrderBy() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select o.id, o.order_date, o.ship_date from o_order o order by o.ship_date desc nulls last")
|
||||
@@ -261,8 +283,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
|
||||
@IgnorePlatform(Platform.ORACLE)
|
||||
@Test
|
||||
public void testPaging_when_setOrderBy_expect_id_appendToOrderBy_with_id() {
|
||||
|
||||
void testPaging_when_setOrderBy_expect_id_appendToOrderBy_with_id() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select o.id, o.order_date, o.ship_date from o_order o order by o.ship_date desc nulls last")
|
||||
@@ -297,8 +318,7 @@ public class TestRawSqlOrmQuery extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPaging_when_setOrderBy_containsId_expect_leaveAsIs() {
|
||||
|
||||
void testPaging_when_setOrderBy_containsId_expect_leaveAsIs() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select o.id, o.order_date, o.ship_date from o_order o order by o.ship_date desc")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.tests.rawsql;
|
||||
|
||||
import io.ebean.DB;
|
||||
import io.ebean.FetchGroup;
|
||||
import io.ebean.RawSql;
|
||||
import io.ebean.RawSqlBuilder;
|
||||
import io.ebean.xtest.BaseTestCase;
|
||||
@@ -13,15 +12,14 @@ import org.tests.rawsql.transport.SampleReport;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TestRawSqlQuerySelect extends BaseTestCase {
|
||||
class TestRawSqlQuerySelect extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void testRawSQL() {
|
||||
|
||||
void testRawSQL() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
RawSql rawSql = RawSqlBuilder.parse("select id, name, anniversary, city from (select c.id, c.name, c.anniversary, a.city from o_customer c left join o_address a ON a.id = c.billing_address_id order by c.id) w").create();
|
||||
String sumSql = "COUNT(1)::BIGINT AS count, SUM(id)::DOUBLE PRECISION AS sum";
|
||||
RawSql rawSql = RawSqlBuilder.parse("select id, name, anniversary, city from (select c.id, c.name, c.anniversary, a.city from o_customer c left join o_address a ON a.id = c.billing_address_id) w").create();
|
||||
String sumSql = "COUNT(1) AS count, SUM(id) AS sum";
|
||||
|
||||
var query = DB.find(SampleReport.class);
|
||||
query.setRawSql(rawSql);
|
||||
@@ -33,7 +31,7 @@ public class TestRawSqlQuerySelect extends BaseTestCase {
|
||||
var countSum = DB.find(SampleReport.class)
|
||||
.setRawSql(rawSql)
|
||||
//.select(sumSql)
|
||||
.select(FetchGroup.of(SampleReport.class, sumSql))
|
||||
.select(sumSql)
|
||||
.setMaxRows(10)
|
||||
.asDto(QuerySumResponse.class)
|
||||
.findOne();
|
||||
|
||||
@@ -12,14 +12,19 @@ import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.Address;
|
||||
import org.tests.model.basic.Contact;
|
||||
import org.tests.model.basic.ContactNote;
|
||||
import org.tests.model.basic.Customer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.util.Comparator;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class TestJsonBeanDescriptorParse extends BaseTestCase {
|
||||
|
||||
@@ -32,6 +37,17 @@ public class TestJsonBeanDescriptorParse extends BaseTestCase {
|
||||
address.setLine1("foo");
|
||||
DB.save(address);
|
||||
customer.setBillingAddress(address);
|
||||
|
||||
Contact alfred = new Contact("Alfred", "P");
|
||||
alfred.setId(789); // set some deterministic id
|
||||
ContactNote note = new ContactNote("Drinks", "Order 100l beer");
|
||||
note.setId(890);
|
||||
alfred.getNotes().add(note);
|
||||
customer.getContacts().add(alfred);
|
||||
Contact anton = new Contact("Anton", "P");
|
||||
anton.setId(790);
|
||||
anton.getNotes().add(new ContactNote("Equipment", "Organize barbecue"));
|
||||
customer.getContacts().add(anton);
|
||||
DB.save(customer);
|
||||
}
|
||||
|
||||
@@ -59,6 +75,38 @@ public class TestJsonBeanDescriptorParse extends BaseTestCase {
|
||||
assertThat(beanState.dirtyValues()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testJsonManyUpdate() throws IOException {
|
||||
|
||||
Customer customer = DB.find(Customer.class, 234);
|
||||
String json =
|
||||
"{\"contacts\": [ "
|
||||
+ " {\"id\": 789, \"lastName\": \"Praml\", \"notes\": ["
|
||||
+ " {\"id\": 890,\"title\": \"Beer\",\"note\": \"Order 200l beer\",\"version\": 17},"
|
||||
+ " {\"title\": \"Food\",\"note\": \"Order 20 steaks\"}"
|
||||
+ " ]},"
|
||||
+ " {\"id\": 790, \"firstName\": \"Anton\", \"lastName\": null, \"notes\" : null } "
|
||||
+ "]}";
|
||||
DB.json().toBean(customer, json);
|
||||
DB.save(customer);
|
||||
|
||||
customer = DB.find(Customer.class, 234);
|
||||
assertThat(customer.getContacts()).hasSize(2);
|
||||
customer.getContacts().sort(Comparator.comparing(Contact::getId));
|
||||
|
||||
Contact contact = customer.getContacts().get(0);
|
||||
assertThat(contact.getFirstName()).isEqualTo("Alfred");
|
||||
assertThat(contact.getLastName()).isEqualTo("Praml");
|
||||
assertThat(contact.getNotes()).hasSize(2).extracting(ContactNote::getNote)
|
||||
.containsExactlyInAnyOrder("Order 200l beer", "Order 20 steaks");
|
||||
|
||||
contact = customer.getContacts().get(1);
|
||||
assertThat(contact.getFirstName()).isEqualTo("Anton");
|
||||
assertThat(contact.getLastName()).isEqualTo(null);
|
||||
assertThat(contact.getNotes()).hasSize(1);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testJsonUpdate() throws IOException {
|
||||
Customer customer = DB.find(Customer.class, 234);
|
||||
|
||||
+12
-12
@@ -21,36 +21,36 @@ create table migtest_ckey_parent (
|
||||
);
|
||||
|
||||
create table migtest_fk_cascade (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
one_id numeric(19),
|
||||
id bigint identity(1,1) not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_cascade primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_fk_cascade_one (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
id bigint identity(1,1) not null,
|
||||
constraint pk_migtest_fk_cascade_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_fk_none (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
one_id numeric(19),
|
||||
id bigint identity(1,1) not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_none primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_fk_none_via_join (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
one_id numeric(19),
|
||||
id bigint identity(1,1) not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_none_via_join primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_fk_one (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
id bigint identity(1,1) not null,
|
||||
constraint pk_migtest_fk_one primary key (id)
|
||||
);
|
||||
|
||||
create table migtest_fk_set_null (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
one_id numeric(19),
|
||||
id bigint identity(1,1) not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
|
||||
@@ -185,7 +185,7 @@ create table migtest_mtm_c (
|
||||
);
|
||||
|
||||
create table migtest_mtm_m (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
id bigint identity(1,1) not null,
|
||||
name varchar(255),
|
||||
constraint pk_migtest_mtm_m primary key (id)
|
||||
);
|
||||
@@ -197,7 +197,7 @@ create table migtest_oto_child (
|
||||
);
|
||||
|
||||
create table migtest_oto_master (
|
||||
id numeric(19) identity(1,1) not null,
|
||||
id bigint identity(1,1) not null,
|
||||
name varchar(255),
|
||||
constraint pk_migtest_oto_master primary key (id)
|
||||
);
|
||||
|
||||
@@ -23,18 +23,18 @@ create table migtest_e_user (
|
||||
|
||||
create table migtest_mtm_c_migtest_mtm_m (
|
||||
migtest_mtm_c_id integer not null,
|
||||
migtest_mtm_m_id numeric(19) not null,
|
||||
migtest_mtm_m_id bigint not null,
|
||||
constraint pk_migtest_mtm_c_migtest_mtm_m primary key (migtest_mtm_c_id,migtest_mtm_m_id)
|
||||
);
|
||||
|
||||
create table migtest_mtm_m_migtest_mtm_c (
|
||||
migtest_mtm_m_id numeric(19) not null,
|
||||
migtest_mtm_m_id bigint not null,
|
||||
migtest_mtm_c_id integer not null,
|
||||
constraint pk_migtest_mtm_m_migtest_mtm_c primary key (migtest_mtm_m_id,migtest_mtm_c_id)
|
||||
);
|
||||
|
||||
create table migtest_mtm_m_phone_numbers (
|
||||
migtest_mtm_m_id numeric(19) not null,
|
||||
migtest_mtm_m_id bigint not null,
|
||||
value varchar(255) not null
|
||||
);
|
||||
|
||||
@@ -88,21 +88,21 @@ alter table migtest_e_basic add new_boolean_field bit default 1 not null;
|
||||
alter table migtest_e_basic add new_boolean_field2 bit default 1 not null;
|
||||
alter table migtest_e_basic add progress integer default 0 not null;
|
||||
alter table migtest_e_basic add new_integer integer default 42 not null;
|
||||
alter table migtest_e_history alter column test_string numeric(19);
|
||||
alter table migtest_e_history alter column test_string bigint;
|
||||
EXEC usp_ebean_drop_default_constraint migtest_e_history2, test_string;
|
||||
alter table migtest_e_history2 alter column test_string varchar(255) not null;
|
||||
alter table migtest_e_history2 add default 'unknown' for test_string;
|
||||
alter table migtest_e_history2 add test_string2 varchar(255);
|
||||
alter table migtest_e_history2 add test_string3 varchar(255) default 'unknown' not null;
|
||||
alter table migtest_e_history2 add new_column varchar(20);
|
||||
alter table migtest_e_history4 alter column test_number numeric(19);
|
||||
alter table migtest_e_history4 alter column test_number bigint;
|
||||
alter table migtest_e_history5 add test_boolean bit default 0 not null;
|
||||
EXEC usp_ebean_drop_default_constraint migtest_e_history6, test_number1;
|
||||
alter table migtest_e_history6 alter column test_number1 integer not null;
|
||||
alter table migtest_e_history6 add default 42 for test_number1;
|
||||
alter table migtest_e_history6 alter column test_number2 integer;
|
||||
alter table migtest_e_softdelete add deleted bit default 0 not null;
|
||||
alter table migtest_oto_child add master_id numeric(19);
|
||||
alter table migtest_oto_child add master_id bigint;
|
||||
-- apply post alter
|
||||
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
|
||||
create unique nonclustered index uq_migtest_e_basic_description on migtest_e_basic(description) where description is not null;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
891357544, I__create_procs.sql
|
||||
-1556604899, 1.0__initial.sql
|
||||
359145725, 1.1.sql
|
||||
254353963, 1.0__initial.sql
|
||||
523634078, 1.1.sql
|
||||
-599071889, 1.2__dropsFor_1.1.sql
|
||||
-1831804381, 1.3.sql
|
||||
-628940135, 1.4__dropsFor_1.3.sql
|
||||
|
||||
+12
-12
@@ -23,41 +23,41 @@ create table migtest_ckey_parent (
|
||||
);
|
||||
|
||||
create table migtest_fk_cascade (
|
||||
id numeric(19) not null,
|
||||
one_id numeric(19),
|
||||
id bigint not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_cascade primary key (id)
|
||||
);
|
||||
create sequence migtest_fk_cascade_seq as bigint start with 1;
|
||||
|
||||
create table migtest_fk_cascade_one (
|
||||
id numeric(19) not null,
|
||||
id bigint not null,
|
||||
constraint pk_migtest_fk_cascade_one primary key (id)
|
||||
);
|
||||
create sequence migtest_fk_cascade_one_seq as bigint start with 1;
|
||||
|
||||
create table migtest_fk_none (
|
||||
id numeric(19) not null,
|
||||
one_id numeric(19),
|
||||
id bigint not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_none primary key (id)
|
||||
);
|
||||
create sequence migtest_fk_none_seq as bigint start with 1;
|
||||
|
||||
create table migtest_fk_none_via_join (
|
||||
id numeric(19) not null,
|
||||
one_id numeric(19),
|
||||
id bigint not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_none_via_join primary key (id)
|
||||
);
|
||||
create sequence migtest_fk_none_via_join_seq as bigint start with 1;
|
||||
|
||||
create table migtest_fk_one (
|
||||
id numeric(19) not null,
|
||||
id bigint not null,
|
||||
constraint pk_migtest_fk_one primary key (id)
|
||||
);
|
||||
create sequence migtest_fk_one_seq as bigint start with 1;
|
||||
|
||||
create table migtest_fk_set_null (
|
||||
id numeric(19) not null,
|
||||
one_id numeric(19),
|
||||
id bigint not null,
|
||||
one_id bigint,
|
||||
constraint pk_migtest_fk_set_null primary key (id)
|
||||
);
|
||||
create sequence migtest_fk_set_null_seq as bigint start with 1;
|
||||
@@ -207,7 +207,7 @@ create table migtest_mtm_c (
|
||||
create sequence migtest_mtm_c_seq as bigint start with 1;
|
||||
|
||||
create table migtest_mtm_m (
|
||||
id numeric(19) not null,
|
||||
id bigint not null,
|
||||
name nvarchar(255),
|
||||
constraint pk_migtest_mtm_m primary key (id)
|
||||
);
|
||||
@@ -221,7 +221,7 @@ create table migtest_oto_child (
|
||||
create sequence migtest_oto_child_seq as bigint start with 1;
|
||||
|
||||
create table migtest_oto_master (
|
||||
id numeric(19) not null,
|
||||
id bigint not null,
|
||||
name nvarchar(255),
|
||||
constraint pk_migtest_oto_master primary key (id)
|
||||
);
|
||||
|
||||
@@ -24,18 +24,18 @@ create sequence migtest_e_user_seq as bigint start with 1;
|
||||
|
||||
create table migtest_mtm_c_migtest_mtm_m (
|
||||
migtest_mtm_c_id integer not null,
|
||||
migtest_mtm_m_id numeric(19) not null,
|
||||
migtest_mtm_m_id bigint not null,
|
||||
constraint pk_migtest_mtm_c_migtest_mtm_m primary key (migtest_mtm_c_id,migtest_mtm_m_id)
|
||||
);
|
||||
|
||||
create table migtest_mtm_m_migtest_mtm_c (
|
||||
migtest_mtm_m_id numeric(19) not null,
|
||||
migtest_mtm_m_id bigint not null,
|
||||
migtest_mtm_c_id integer not null,
|
||||
constraint pk_migtest_mtm_m_migtest_mtm_c primary key (migtest_mtm_m_id,migtest_mtm_c_id)
|
||||
);
|
||||
|
||||
create table migtest_mtm_m_phone_numbers (
|
||||
migtest_mtm_m_id numeric(19) not null,
|
||||
migtest_mtm_m_id bigint not null,
|
||||
value nvarchar(255) not null
|
||||
);
|
||||
|
||||
@@ -89,21 +89,21 @@ alter table migtest_e_basic add new_boolean_field bit default 1 not null;
|
||||
alter table migtest_e_basic add new_boolean_field2 bit default 1 not null;
|
||||
alter table migtest_e_basic add progress integer default 0 not null;
|
||||
alter table migtest_e_basic add new_integer integer default 42 not null;
|
||||
alter table migtest_e_history alter column test_string numeric(19);
|
||||
alter table migtest_e_history alter column test_string bigint;
|
||||
EXEC usp_ebean_drop_default_constraint migtest_e_history2, test_string;
|
||||
alter table migtest_e_history2 alter column test_string nvarchar(255) not null;
|
||||
alter table migtest_e_history2 add default 'unknown' for test_string;
|
||||
alter table migtest_e_history2 add test_string2 nvarchar(255);
|
||||
alter table migtest_e_history2 add test_string3 nvarchar(255) default 'unknown' not null;
|
||||
alter table migtest_e_history2 add new_column nvarchar(20);
|
||||
alter table migtest_e_history4 alter column test_number numeric(19);
|
||||
alter table migtest_e_history4 alter column test_number bigint;
|
||||
alter table migtest_e_history5 add test_boolean bit default 0 not null;
|
||||
EXEC usp_ebean_drop_default_constraint migtest_e_history6, test_number1;
|
||||
alter table migtest_e_history6 alter column test_number1 integer not null;
|
||||
alter table migtest_e_history6 add default 42 for test_number1;
|
||||
alter table migtest_e_history6 alter column test_number2 integer;
|
||||
alter table migtest_e_softdelete add deleted bit default 0 not null;
|
||||
alter table migtest_oto_child add master_id numeric(19);
|
||||
alter table migtest_oto_child add master_id bigint;
|
||||
-- apply post alter
|
||||
alter table migtest_e_basic add constraint ck_migtest_e_basic_status check ( status in ('N','A','I','?'));
|
||||
create unique nonclustered index uq_migtest_e_basic_description on migtest_e_basic(description) where description is not null;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
891357544, I__create_procs.sql
|
||||
1994995811, 1.0__initial.sql
|
||||
1778963293, 1.1.sql
|
||||
-2080592180, 1.0__initial.sql
|
||||
1381251697, 1.1.sql
|
||||
-599071889, 1.2__dropsFor_1.1.sql
|
||||
495243310, 1.3.sql
|
||||
-628940135, 1.4__dropsFor_1.3.sql
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
ebean.test.platform=postgres
|
||||
datasource.default=postgres
|
||||
ebean.test.dbName=unit
|
||||
ebean.test.postgres.version=15
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>kotlin querybean generator</name>
|
||||
@@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -64,14 +64,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+14
-14
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
@@ -14,67 +14,67 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hsqldb</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlanywhere</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-hsqldb</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
@@ -14,13 +14,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>platforms</artifactId>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-sqlanywhere</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>platforms</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+2
-7
@@ -5,12 +5,7 @@ import io.ebean.Query;
|
||||
import io.ebean.annotation.PersistBatch;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.config.PlatformConfig;
|
||||
import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
import io.ebean.config.dbplatform.DbPlatformType;
|
||||
import io.ebean.config.dbplatform.DbType;
|
||||
import io.ebean.config.dbplatform.IdType;
|
||||
import io.ebean.config.dbplatform.PlatformIdGenerator;
|
||||
import io.ebean.config.dbplatform.SqlErrorCodes;
|
||||
import io.ebean.config.dbplatform.*;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Types;
|
||||
@@ -59,7 +54,7 @@ abstract class SqlServerBasePlatform extends DatabasePlatform {
|
||||
this.dbDefaultValue.setNow("SYSUTCDATETIME()");
|
||||
dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("bit"));
|
||||
dbTypeMap.put(DbType.INTEGER, new DbPlatformType("integer", false));
|
||||
dbTypeMap.put(DbType.BIGINT, new DbPlatformType("numeric", 19));
|
||||
dbTypeMap.put(DbType.BIGINT, new DbPlatformType("bigint", false));
|
||||
dbTypeMap.put(DbType.REAL, new DbPlatformType("float(16)"));
|
||||
dbTypeMap.put(DbType.DOUBLE, new DbPlatformType("float(32)"));
|
||||
dbTypeMap.put(DbType.TINYINT, new DbPlatformType("smallint"));
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ebean parent</name>
|
||||
@@ -38,6 +38,9 @@
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<nexus.staging.stagingRepositoryId>ebeanCore</nexus.staging.stagingRepositoryId>
|
||||
<nexus.staging.keepStagingRepositoryOnFailure>true</nexus.staging.keepStagingRepositoryOnFailure>
|
||||
<nexus.staging.skipStagingRepositoryClose>true</nexus.staging.skipStagingRepositoryClose>
|
||||
<nexus.staging.autoReleaseAfterClose>false</nexus.staging.autoReleaseAfterClose>
|
||||
<jackson.version>2.14.0</jackson.version>
|
||||
<h2database.version>2.1.214</h2database.version>
|
||||
@@ -49,8 +52,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.15.0</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>13.15.0</ebean-maven-plugin.version>
|
||||
<ebean-agent.version>13.15.2</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>13.15.2</ebean-maven-plugin.version>
|
||||
<surefire.useModulePath>false</surefire.useModulePath>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<name>querybean generator</name>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>tests</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>tests</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-java16</artifactId>
|
||||
@@ -18,7 +18,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<path>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.14.2-SNAPSHOT</version>
|
||||
<version>13.15.2-SNAPSHOT</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>tests</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>test-kotlin</artifactId>
|
||||
@@ -40,7 +40,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -53,7 +53,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.15.0</version>
|
||||
<version>13.15.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user