mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b2c016af2 | ||
|
|
29d946ec59 | ||
|
|
da76b422c8 | ||
|
|
a1a3b33fc6 | ||
|
|
7ecd7877d5 | ||
|
|
e5f64f4211 | ||
|
|
90a6b71b7e | ||
|
|
131d531922 | ||
|
|
5684919a9f | ||
|
|
80fc0723c8 | ||
|
|
3ae4c8981e | ||
|
|
b80c67286b | ||
|
|
0bead4135e | ||
|
|
ac6473e039 | ||
|
|
32188bdd54 | ||
|
|
b3a577e3f9 | ||
|
|
7d1774e2ed | ||
|
|
395edb62bf | ||
|
|
716b7e7b93 | ||
|
|
9aadc347d7 | ||
|
|
d2d1423c88 | ||
|
|
73cfea6053 | ||
|
|
1614166d75 | ||
|
|
3d9b122a9f | ||
|
|
1cc1d29c2f |
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-clickhouse</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-db2</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-hana</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mariadb</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-mysql</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-nuodb</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-oracle</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
<name>ebean-postgis</name>
|
||||
<description>ebean-postgis composite</description>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
|
||||
<properties>
|
||||
<postgis.jdbc.version>2.5.1</postgis.jdbc.version>
|
||||
<postgres.jdbc.version>42.6.0</postgres.jdbc.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-migration</artifactId>
|
||||
<version>${ebean-migration.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${postgres.jdbc.version}</version>
|
||||
<exclusions>
|
||||
<!-- exclude unnecessary checker framework -->
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.postgis</groupId>
|
||||
<artifactId>postgis-jdbc</artifactId>
|
||||
<version>${postgis.jdbc.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package io.ebean.postgis.assembly;
|
||||
|
||||
/**
|
||||
* Nothing interesting here - required placeholder for javadoc.
|
||||
*/
|
||||
public class Assembly {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
module io.ebean.postgis {
|
||||
|
||||
requires transitive io.ebean.api;
|
||||
requires transitive io.ebean.core;
|
||||
requires transitive io.ebean.datasource;
|
||||
requires transitive io.ebean.querybean;
|
||||
requires transitive io.ebean.platform.postgres;
|
||||
// requires transitive io.ebean.postgis.types;
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlite</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -42,13 +42,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -41,7 +41,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -60,13 +60,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
+2
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>composites</artifactId>
|
||||
@@ -23,6 +23,7 @@
|
||||
<module>ebean-nuodb</module>
|
||||
<module>ebean-oracle</module>
|
||||
<module>ebean-postgres</module>
|
||||
<module>ebean-postgis</module>
|
||||
<!-- <module>sqlanywhere</module>-->
|
||||
<module>ebean-sqlite</module>
|
||||
<module>ebean-sqlserver</module>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
|
||||
@@ -3,6 +3,9 @@ package io.ebean.event;
|
||||
import jakarta.servlet.ServletContextEvent;
|
||||
|
||||
/**
|
||||
* Deprecated for removal - no intention to replace. Create your own copy of this
|
||||
* ServletContextListener if needed for your application.
|
||||
* <p>
|
||||
* Listens for webserver server starting and stopping events.
|
||||
* <p>
|
||||
* This should be used when the deployment is into a servlet container where the webapp
|
||||
@@ -15,6 +18,7 @@ import jakarta.servlet.ServletContextEvent;
|
||||
* hook that Ebean registers.
|
||||
* </p>
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public class ServletContextListener implements jakarta.servlet.ServletContextListener {
|
||||
|
||||
/**
|
||||
|
||||
+36
-30
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -89,25 +89,25 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -125,13 +125,13 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -155,46 +155,40 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>13.22.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<!-- platforms -->
|
||||
@@ -202,67 +196,79 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-clickhouse</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-db2</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-h2</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-hana</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mariadb</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-mysql</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-nuodb</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-oracle</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgres</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlite</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-sqlserver</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -30,7 +30,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.4.3</version>
|
||||
<version>42.6.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
+7
-7
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -46,7 +46,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -151,7 +151,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.1</version>
|
||||
<version>42.6.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@@ -159,21 +159,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-sqlserver</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -148,4 +148,10 @@ public interface DbSqlContext {
|
||||
* Add extra joins *IF* required to support inheritance discriminator in projection.
|
||||
*/
|
||||
void flushExtraJoins();
|
||||
|
||||
/**
|
||||
* Return true if the last join was added and false means the join was suppressed
|
||||
* as it was already added to the query.
|
||||
*/
|
||||
boolean joinAdded();
|
||||
}
|
||||
|
||||
@@ -84,6 +84,9 @@ public final class BatchedPstmt implements SpiProfileTransactionEvent {
|
||||
*/
|
||||
private void flushStatementBatch() throws SQLException {
|
||||
final int[] rows = pstmt.executeBatch();
|
||||
if (transaction.isLogSql()) {
|
||||
transaction.logSql(" -- executeBatch() size:{0} sql:{1}", rows.length, sql);
|
||||
}
|
||||
if (rows.length != list.size()) {
|
||||
throw new IllegalStateException("Invalid state on executeBatch, rows:" + rows.length + " != " + list.size());
|
||||
}
|
||||
@@ -153,6 +156,9 @@ public final class BatchedPstmt implements SpiProfileTransactionEvent {
|
||||
private void executeAndCheckRowCounts() throws SQLException {
|
||||
try {
|
||||
results = pstmt.executeBatch();
|
||||
if (transaction.isLogSql()) {
|
||||
transaction.logSql(" -- executeBatch() size:{0} sql:{1}", results.length, sql);
|
||||
}
|
||||
if (results.length != list.size()) {
|
||||
throw new SQLException("Invalid state on executeBatch, rows:" + results.length + " != " + list.size());
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ final class DefaultDbSqlContext implements DbSqlContext {
|
||||
private final CQueryDraftSupport draftSupport;
|
||||
private final CQueryHistorySupport historySupport;
|
||||
private final boolean historyQuery;
|
||||
private boolean joinSuppressed;
|
||||
|
||||
DefaultDbSqlContext(SqlTreeAlias alias, String columnAliasPrefix, CQueryHistorySupport historySupport,
|
||||
CQueryDraftSupport draftSupport, String fromForUpdate) {
|
||||
@@ -50,6 +51,11 @@ final class DefaultDbSqlContext implements DbSqlContext {
|
||||
this.fromForUpdate = fromForUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean joinAdded() {
|
||||
return !joinSuppressed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIncludeSoftDelete() {
|
||||
return alias.isIncludeSoftDelete();
|
||||
@@ -118,9 +124,10 @@ final class DefaultDbSqlContext implements DbSqlContext {
|
||||
}
|
||||
String joinKey = table + "-" + a1 + "-" + a2;
|
||||
if (tableJoins.contains(joinKey)) {
|
||||
joinSuppressed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
joinSuppressed = false;
|
||||
tableJoins.add(joinKey);
|
||||
sb.append(' ').append(type);
|
||||
boolean addAsOfOnClause = false;
|
||||
|
||||
@@ -10,6 +10,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static io.ebeaninternal.api.SpiQuery.TemporalMode.SOFT_DELETED;
|
||||
|
||||
/**
|
||||
* The purpose is to add an extra join to the query.
|
||||
* <p>
|
||||
@@ -145,7 +147,7 @@ final class SqlTreeNodeExtraJoin implements SqlTreeNode {
|
||||
assocBeanProperty.appendFrom(ctx, joinType, null);
|
||||
}
|
||||
joinType = assocBeanProperty.addJoin(joinType, prefix, ctx);
|
||||
if (!oneToOneExported && assocBeanProperty.isTargetSoftDelete() && temporalMode != SpiQuery.TemporalMode.SOFT_DELETED) {
|
||||
if (temporalMode != SOFT_DELETED && ctx.joinAdded() && assocBeanProperty.isTargetSoftDelete()) {
|
||||
ctx.append(" and ").append(assocBeanProperty.softDeletePredicate(ctx.tableAlias(prefix)));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -88,14 +88,14 @@ final class SqlTreeNodeManyWhereJoin implements SqlTreeNode {
|
||||
|
||||
if (nodeBeanProp instanceof STreePropertyAssocOne) {
|
||||
nodeBeanProp.addJoin(joinType, parentAlias, alias, ctx);
|
||||
if (softDelete) {
|
||||
if (softDelete && ctx.joinAdded()) {
|
||||
ctx.append(" and ").append(target.softDeletePredicate(alias));
|
||||
}
|
||||
} else {
|
||||
STreePropertyAssocMany manyProp = (STreePropertyAssocMany) nodeBeanProp;
|
||||
if (!manyProp.hasJoinTable()) {
|
||||
manyProp.addJoin(joinType, parentAlias, alias, ctx);
|
||||
if (softDelete) {
|
||||
if (softDelete && ctx.joinAdded()) {
|
||||
ctx.append(" and ").append(target.softDeletePredicate(alias));
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# ebean.postgis.types
|
||||
|
||||
Ebean support for Postgres Geometry types
|
||||
@@ -4,14 +4,11 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis</name>
|
||||
<description>ebean postgis module</description>
|
||||
<url>https://ebean.io/</url>
|
||||
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<name>ebean postgis types</name>
|
||||
<artifactId>ebean-postgis-types</artifactId>
|
||||
|
||||
<properties>
|
||||
<postgis.jdbc.version>2.5.1</postgis.jdbc.version>
|
||||
@@ -22,14 +19,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-postgres</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -50,7 +47,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.1</version>
|
||||
<version>42.6.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -65,7 +62,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import io.ebeaninternal.api.GeoTypeProvider;
|
||||
/**
|
||||
* Provides GeoTypeProvider and ExtraTypeFactory.
|
||||
*/
|
||||
module io.ebean.postgis {
|
||||
module io.ebean.postgis.types {
|
||||
|
||||
provides ExtraTypeFactory with io.ebean.postgis.PostgisExtraTypeFactory;
|
||||
provides GeoTypeProvider with io.ebean.postgis.PostgisGeoTypeBindProvider;
|
||||
@@ -1,2 +0,0 @@
|
||||
# ebean-com.avaje.ebean.postgis
|
||||
Ebean support for Postgres Geometry types - org.com.avaje.ebean.postgis and org.geolatte.geom
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -63,21 +63,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.example.domain;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import org.example.domain.other.OtherBean;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Entity
|
||||
public class OtherMain {
|
||||
|
||||
@Id
|
||||
long id;
|
||||
|
||||
@ManyToOne
|
||||
OtherBean other;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.example.domain.other;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Entity
|
||||
public class OtherBean {
|
||||
|
||||
@Id
|
||||
long id;
|
||||
String name;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.example.domain.other;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Entity
|
||||
public class OtherSiteUser {
|
||||
|
||||
@Embeddable
|
||||
public static class Id {
|
||||
|
||||
// Use siteId, userId matching by db column naming convention
|
||||
public UUID siteId;
|
||||
public UUID userId;
|
||||
|
||||
public Id(UUID siteId, UUID userId) {
|
||||
this.siteId = siteId;
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Id that = (Id) o;
|
||||
return Objects.equals(siteId, that.siteId) && Objects.equals(userId, that.userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(siteId, userId);
|
||||
}
|
||||
}
|
||||
|
||||
@EmbeddedId
|
||||
Id id;
|
||||
|
||||
String description;
|
||||
|
||||
@Version
|
||||
long version;
|
||||
|
||||
}
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -22,35 +22,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-spring-txn</artifactId>
|
||||
@@ -28,7 +28,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+7
-7
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -28,20 +28,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-h2</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -132,14 +132,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-jackson-mapper</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-platform-all</artifactId>
|
||||
<version>13.22.0</version>
|
||||
<version>13.23.0-jakarta</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.1</version>
|
||||
<version>42.6.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.checkerframework</groupId>
|
||||
|
||||
@@ -33,7 +33,7 @@ class EbeanServer_deleteAllByIdTest extends BaseTestCase {
|
||||
assertNotNull(bean2.getId());
|
||||
|
||||
List<String> loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(4);
|
||||
assertThat(loggedSql).hasSize(5);
|
||||
assertThat(loggedSql.get(0)).contains("insert into e_basicver");
|
||||
assertSqlBind(loggedSql, 1, 3);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ public class EbeanServer_saveAllTest extends BaseTestCase {
|
||||
|
||||
// assert
|
||||
List<String> loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(4);
|
||||
assertThat(loggedSql).hasSize(5);
|
||||
assertThat(loggedSql.get(0)).contains("insert into e_basicver (");
|
||||
assertThat(loggedSql.get(0)).contains("name, description, other, last_update) values (");
|
||||
|
||||
@@ -50,7 +50,7 @@ public class EbeanServer_saveAllTest extends BaseTestCase {
|
||||
DB.deleteAll(someBeans);
|
||||
|
||||
loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(4);
|
||||
assertThat(loggedSql).hasSize(5);
|
||||
assertThat(loggedSql.get(0)).contains("delete from e_basicver where id=?");
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public class EbeanServer_saveAllTest extends BaseTestCase {
|
||||
|
||||
// assert
|
||||
List<String> loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(4);
|
||||
assertThat(loggedSql).hasSize(5);
|
||||
assertThat(loggedSql.get(0)).contains("insert into e_basicver (");
|
||||
assertThat(loggedSql.get(0)).contains("name, description, other, last_update) values (");
|
||||
|
||||
@@ -151,7 +151,7 @@ public class EbeanServer_saveAllTest extends BaseTestCase {
|
||||
txn.commit();
|
||||
}
|
||||
loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(4);
|
||||
assertThat(loggedSql).hasSize(5);
|
||||
assertThat(loggedSql.get(0)).contains("delete from e_basicver where id=?");
|
||||
}
|
||||
|
||||
|
||||
@@ -27,12 +27,12 @@ class TestDeleteCascadingOneToMany extends BaseTestCase {
|
||||
DB.delete(a0);
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(5);
|
||||
assertThat(sql).hasSize(6);
|
||||
assertThat(sql.get(0)).contains("select t0.id from section t0 where article_id=?");
|
||||
assertThat(sql.get(1)).contains("select t0.id from sub_section t0 where (section_id)"); // in | any
|
||||
assertThat(sql.get(2)).contains("delete from section where id"); // in | any
|
||||
assertThat(sql.get(3)).contains(" -- bind");
|
||||
assertThat(sql.get(4)).contains("delete from article where id=? and version=?");
|
||||
assertThat(sql.get(5)).contains("delete from article where id=? and version=?");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -40,25 +40,30 @@ class TestDeleteCascadeById extends BaseTestCase {
|
||||
|
||||
DB.delete(o);
|
||||
List<String> sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(6);
|
||||
assertThat(sql).hasSize(8);
|
||||
assertThat(sql.get(0)).contains("select t0.id from o_order_detail t0 where order_id=?");
|
||||
assertThat(sql.get(1)).contains("delete from o_order_detail where id");
|
||||
assertThat(sql.get(2)).contains("-- bind(Array[3]");
|
||||
assertThat(sql.get(3)).contains("delete from or_order_ship where order_id = ?");
|
||||
assertThat(sql.get(4)).contains("-- bind(");
|
||||
assertThat(sql.get(5)).contains("delete from o_order where id=? and updtime=?");
|
||||
assertThat(sql.get(5)).contains("-- executeBatch");
|
||||
assertThat(sql.get(6)).contains("-- executeBatch");
|
||||
assertThat(sql.get(7)).contains("delete from o_order where id=? and updtime=?");
|
||||
|
||||
DB.delete(cust);
|
||||
sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(9);
|
||||
assertThat(sql).hasSize(12);
|
||||
assertThat(sql.get(0)).contains("select t0.id from contact t0 where customer_id=");
|
||||
assertThat(sql.get(1)).contains("delete from contact_note where (contact_id)");
|
||||
assertThat(sql.get(2)).contains(" -- bind(Array[3]=");
|
||||
assertThat(sql.get(3)).contains("delete from contact where id");
|
||||
assertThat(sql.get(4)).contains(" -- bind(Array[3]");
|
||||
assertThat(sql.get(5)).contains("delete from o_customer where id=? and version=?");
|
||||
assertThat(sql.get(6)).contains("delete from o_address where id=? and updtime=?");
|
||||
assertThat(sql.get(7)).contains(" -- bind(");
|
||||
assertThat(sql.get(8)).contains(" -- bind(");
|
||||
assertThat(sql.get(5)).contains(" -- executeBatch");
|
||||
assertThat(sql.get(6)).contains(" -- executeBatch");
|
||||
assertThat(sql.get(7)).contains("delete from o_customer where id=? and version=?");
|
||||
assertThat(sql.get(8)).contains("delete from o_address where id=? and updtime=?");
|
||||
assertThat(sql.get(9)).contains(" -- bind(");
|
||||
assertThat(sql.get(10)).contains(" -- bind(");
|
||||
assertThat(sql.get(11)).contains(" -- executeBatch");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class TestBatchInsertFlush extends BaseTestCase {
|
||||
assertSql(sql.get(0)).contains("insert into t_atable_thatisrelatively");
|
||||
assertSql(sql.get(1)).contains("-- bind(");
|
||||
// detail
|
||||
assertThat(sql.get(3)).contains("insert into t_detail_with_other_namexxxyy");
|
||||
assertThat(sql.get(4)).contains("insert into t_detail_with_other_namexxxyy");
|
||||
|
||||
assertThat(((SpiTransaction) transaction).label()).isEqualTo("TestBatchInsertFlush.no_cascade");
|
||||
|
||||
@@ -205,7 +205,7 @@ public class TestBatchInsertFlush extends BaseTestCase {
|
||||
assertThat(LoggedSql.collect()).isEmpty();
|
||||
Integer id = b1.getId();
|
||||
assertNotNull(id);
|
||||
assertThat(LoggedSql.collect()).hasSize(3);
|
||||
assertThat(LoggedSql.collect()).hasSize(4);
|
||||
|
||||
EBasicVer b3 = new EBasicVer("b3");
|
||||
server.save(b3);
|
||||
@@ -231,7 +231,7 @@ public class TestBatchInsertFlush extends BaseTestCase {
|
||||
assertThat(LoggedSql.collect()).isEmpty();
|
||||
Integer id = b1.getId();
|
||||
assertNotNull(id);
|
||||
assertThat(LoggedSql.collect()).hasSize(3);
|
||||
assertThat(LoggedSql.collect()).hasSize(4);
|
||||
|
||||
EBasicVer b3 = new EBasicVer("b3");
|
||||
server.save(b3, txn);
|
||||
@@ -298,7 +298,7 @@ public class TestBatchInsertFlush extends BaseTestCase {
|
||||
server.save(b3, txn);
|
||||
|
||||
txn.commit();
|
||||
assertThat(LoggedSql.collect()).hasSize(5);
|
||||
assertThat(LoggedSql.collect()).hasSize(7);
|
||||
|
||||
} finally {
|
||||
txn.end();
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class TestBatchInsertWithInitialisedCollection extends BaseTestCase {
|
||||
}
|
||||
|
||||
List<String> loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(4);
|
||||
assertThat(loggedSql).hasSize(5);
|
||||
assertThat(loggedSql.get(0)).contains("insert into o_cached_bean (");
|
||||
assertThat(loggedSql.get(0)).contains("name) values (?");
|
||||
}
|
||||
|
||||
@@ -55,12 +55,15 @@ public class TestMultiCascadeBatch extends BaseTestCase {
|
||||
|
||||
assertThat(list).hasSize(3);
|
||||
|
||||
assertThat(sql).hasSize(5);
|
||||
assertThat(sql).hasSize(7);
|
||||
assertSql(sql.get(0)).contains("insert into site (id, name");
|
||||
assertSql(sql.get(1)).contains("insert into site (id, name");
|
||||
assertSqlBind(sql.get(2));
|
||||
assertThat(sql.get(3)).contains("insert into site (id, name");
|
||||
assertSqlBind(sql.get(4));
|
||||
assertThat(sql.get(3)).contains(" -- executeBatch");
|
||||
assertThat(sql.get(4)).contains("insert into site (id, name");
|
||||
assertSqlBind(sql.get(5));
|
||||
assertThat(sql.get(6)).contains(" -- executeBatch");
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -77,7 +77,7 @@ public class TestOrderedList extends BaseTestCase {
|
||||
DB.save(fresh);
|
||||
|
||||
sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(7);
|
||||
assertThat(sql).hasSize(8);
|
||||
assertSql(sql.get(0)).contains("update om_ordered_master set name=?, version=?");
|
||||
assertSql(sql.get(1)).contains("update om_ordered_detail set version=?, sort_order=? where id=? and version=?");
|
||||
|
||||
@@ -86,7 +86,7 @@ public class TestOrderedList extends BaseTestCase {
|
||||
DB.save(fresh);
|
||||
|
||||
sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(3);
|
||||
assertThat(sql).hasSize(4);
|
||||
assertSql(sql.get(0)).contains("update om_ordered_master set name=?, version=? where id=? and version=?; -- bind(m1-mod3");
|
||||
assertSql(sql.get(1)).contains("update om_ordered_detail set name=?, version=?, sort_order=? where id=? and version=?");
|
||||
assertThat(sql.get(2)).contains("bind(was 1,3,2,");
|
||||
@@ -94,10 +94,10 @@ public class TestOrderedList extends BaseTestCase {
|
||||
DB.delete(fresh);
|
||||
|
||||
sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(3);
|
||||
assertThat(sql).hasSize(4);
|
||||
assertSql(sql.get(0)).contains("delete from om_ordered_detail where master_id = ?");
|
||||
assertSqlBind(sql.get(1));
|
||||
assertSql(sql.get(2)).contains("delete from om_ordered_master where id=? and version=?");
|
||||
assertSql(sql.get(3)).contains("delete from om_ordered_master where id=? and version=?");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -20,20 +20,20 @@ class TestOrphanCollectionReplacement extends BaseTestCase {
|
||||
long parentId = setup(1000); // can be handled by statement for SqlServer
|
||||
List<String> sql = doUpdate(parentId, name -> !"c0".equals(name));
|
||||
if (isH2() || isPostgresCompatible()) { // using deleted=true vs deleted=1
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql).hasSize(6);
|
||||
assertThat(sql.get(0)).contains("update coone_many set deleted=true where coone_id = ? and not ( id ");
|
||||
assertThat(sql.get(1)).contains(" -- bind(");
|
||||
assertThat(sql.get(2)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(3)).contains(" -- bind(");
|
||||
assertThat(sql.get(3)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(4)).contains(" -- bind(");
|
||||
}
|
||||
|
||||
if (isSqlServer()) {
|
||||
// statement mode
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql).hasSize(6);
|
||||
assertThat(sql.get(0)).contains("update coone_many set deleted=1 where coone_id = ? and not ( id ");
|
||||
assertThat(sql.get(1)).contains(" -- bind(");
|
||||
assertThat(sql.get(2)).contains("insert into coone_many (id, coone_id, name, deleted) values (?,?,?,?)");
|
||||
assertThat(sql.get(3)).contains(" -- bind(");
|
||||
assertThat(sql.get(3)).contains("insert into coone_many (id, coone_id, name, deleted) values (?,?,?,?)");
|
||||
assertThat(sql.get(4)).contains(" -- bind(");
|
||||
}
|
||||
COOne fetchedUser2 = DB.find(COOne.class, parentId);
|
||||
requireNonNull(fetchedUser2);
|
||||
@@ -51,24 +51,24 @@ class TestOrphanCollectionReplacement extends BaseTestCase {
|
||||
List<String> sql = doUpdate(parentId, name -> !"c0".equals(name));
|
||||
if (isH2() || isPostgresCompatible()) { // using deleted=true vs deleted=1
|
||||
// CHECKME: H2 would not require the batch mode here and could theoretically do it in fewer statements
|
||||
assertThat(sql).hasSize(5);
|
||||
assertThat(sql).hasSize(7);
|
||||
assertThat(sql.get(0)).contains("select t0.id from coone_many t0 where coone_id=? and t0.deleted = false and t0.deleted = false; --bind");
|
||||
if (isH2()) {
|
||||
assertThat(sql.get(1)).contains("update coone_many set deleted=true where id in (?)");
|
||||
}
|
||||
assertThat(sql.get(2)).contains(" -- bind(");
|
||||
assertThat(sql.get(3)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(4)).contains(" -- bind(");
|
||||
assertThat(sql.get(4)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(5)).contains(" -- bind(");
|
||||
}
|
||||
|
||||
if (isSqlServer()) {
|
||||
// filter mode
|
||||
assertThat(sql).hasSize(5);
|
||||
assertThat(sql).hasSize(7);
|
||||
assertThat(sql.get(0)).contains("select t0.id from coone_many t0 where coone_id=? and t0.deleted = 0 and t0.deleted = 0; --bind");
|
||||
assertThat(sql.get(1)).contains("update coone_many set deleted=1 where id in (?)");
|
||||
assertThat(sql.get(2)).contains(" -- bind(");
|
||||
assertThat(sql.get(3)).contains("insert into coone_many (id, coone_id, name, deleted) values (?,?,?,?)");
|
||||
assertThat(sql.get(4)).contains(" -- bind(");
|
||||
assertThat(sql.get(4)).contains("insert into coone_many (id, coone_id, name, deleted) values (?,?,?,?)");
|
||||
assertThat(sql.get(5)).contains(" -- bind(");
|
||||
}
|
||||
COOne fetchedUser2 = DB.find(COOne.class, parentId);
|
||||
requireNonNull(fetchedUser2);
|
||||
@@ -86,36 +86,40 @@ class TestOrphanCollectionReplacement extends BaseTestCase {
|
||||
List<String> sql = doUpdate(parentId, name -> Integer.parseInt(name.substring(1)) >= 2500);
|
||||
if (isH2()) { // using deleted=true vs deleted=1
|
||||
// CHECKME: H2 would not require the batch mode here and could theoretically do it in fewer statements
|
||||
assertThat(sql).hasSize(8);
|
||||
assertThat(sql).hasSize(11);
|
||||
assertThat(sql.get(0)).contains("select t0.id from coone_many t0 where coone_id=? and t0.deleted = false and t0.deleted = false; --bind"); // find all Ids
|
||||
assertThat(sql.get(1)).contains("update coone_many set deleted=true where id in (?,?,?");
|
||||
assertThat(sql.get(2)).contains(" -- bind(Array[1000]="); // update first 1000
|
||||
assertThat(sql.get(3)).contains(" -- bind(Array[1000]="); // update second 1000
|
||||
assertThat(sql.get(4)).contains("update coone_many set deleted=true where id in (?,?,?");
|
||||
assertThat(sql.get(5)).contains(" -- bind(Array[500]="); // update last 500
|
||||
assertThat(sql.get(6)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(7)).contains(" -- bind(");
|
||||
assertThat(sql.get(8)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(9)).contains(" -- bind(");
|
||||
}
|
||||
if (isPostgresCompatible()) {
|
||||
assertThat(sql).hasSize(7);
|
||||
assertThat(sql).hasSize(9);
|
||||
assertThat(sql.get(0)).contains("select t0.id from coone_many t0 where coone_id=? and t0.deleted = false and t0.deleted = false; --bind"); // find all Ids
|
||||
assertThat(sql.get(1)).contains("update coone_many set deleted=true where id = any(?");
|
||||
assertThat(sql.get(2)).contains(" -- bind(Array[1000]="); // update first 1000
|
||||
assertThat(sql.get(3)).contains(" -- bind(Array[1000]="); // update first 1000
|
||||
assertThat(sql.get(4)).contains(" -- bind(Array[500]="); // update last 500
|
||||
assertThat(sql.get(5)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(6)).contains(" -- bind(");
|
||||
assertThat(sql.get(6)).contains("insert into coone_many (coone_id, name, deleted) values (?,?,?)");
|
||||
assertThat(sql.get(7)).contains(" -- bind(");
|
||||
}
|
||||
|
||||
if (isSqlServer()) {
|
||||
assertThat(sql).hasSize(7);
|
||||
assertThat(sql).hasSize(11);
|
||||
assertThat(sql.get(0)).contains("select t0.id from coone_many t0 where coone_id=? and t0.deleted = 0 and t0.deleted = 0; --bind"); // find all Ids
|
||||
assertThat(sql.get(1)).contains("update coone_many set deleted=1 where id in (?,?,?");
|
||||
assertThat(sql.get(2)).contains(" -- bind(Array[2000]="); // update first 2000
|
||||
assertThat(sql.get(3)).contains("update coone_many set deleted=1 where id in (?,?,?");
|
||||
assertThat(sql.get(4)).contains(" -- bind(Array[500]="); // update next 500
|
||||
assertThat(sql.get(5)).contains("insert into coone_many (id, coone_id, name, deleted) values (?,?,?,?)");
|
||||
assertThat(sql.get(6)).contains(" -- bind(");
|
||||
assertThat(sql.get(2)).contains(" -- bind(Array[1000]="); // update first 2000
|
||||
assertThat(sql.get(3)).contains(" -- bind(Array[1000]="); // update first 2000
|
||||
assertThat(sql.get(4)).contains("update coone_many set deleted=1 where id in (?,?,?");
|
||||
assertThat(sql.get(5)).contains(" -- bind(Array[500]="); // update next 500
|
||||
assertThat(sql.get(6)).contains(" -- executeBatch() size:2");
|
||||
assertThat(sql.get(7)).contains(" -- executeBatch() size:1");
|
||||
assertThat(sql.get(8)).contains("insert into coone_many (id, coone_id, name, deleted) values (?,?,?,?)");
|
||||
assertThat(sql.get(9)).contains(" -- bind(");
|
||||
assertThat(sql.get(10)).contains(" -- executeBatch()"); // update next 500
|
||||
}
|
||||
|
||||
COOne fetchedUser2 = DB.find(COOne.class, parentId);
|
||||
@@ -128,12 +132,10 @@ class TestOrphanCollectionReplacement extends BaseTestCase {
|
||||
.contains("cTest"); // added
|
||||
}
|
||||
|
||||
|
||||
private static List<String> doUpdate(long parentId, Predicate<String> filter) {
|
||||
COOne fetchedParent = DB.find(COOne.class, parentId);
|
||||
assert fetchedParent != null;
|
||||
|
||||
|
||||
List<COOneMany> filtered = fetchedParent.getChildren().stream().filter(r -> filter.test(r.getName())).collect(Collectors.toList());
|
||||
|
||||
List<COOneMany> updatedRoles = new ArrayList<>();
|
||||
|
||||
@@ -71,7 +71,7 @@ public class TestPrivateOwned extends BaseTestCase {
|
||||
DB.save(m0);
|
||||
|
||||
List<String> loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(2);
|
||||
assertThat(loggedSql).hasSize(3);
|
||||
assertThat(loggedSql.get(0)).contains("delete from t_detail_with_other_namexxxyy where id=?");
|
||||
assertSqlBind(loggedSql.get(1));
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@ public class TestForeignKeyModes extends BaseTestCase {
|
||||
DB.delete(none);
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(3);
|
||||
assertThat(sql).hasSize(4);
|
||||
assertSql(sql.get(0)).contains("delete from dfk_none_via_mto_m_dfk_one where dfk_none_via_mto_m_id = ?");
|
||||
assertSqlBind(sql.get(1));
|
||||
assertSql(sql.get(2)).contains("delete from dfk_none_via_mto_m where id=?");
|
||||
assertSql(sql.get(3)).contains("delete from dfk_none_via_mto_m where id=?");
|
||||
}
|
||||
|
||||
@IgnorePlatform(Platform.NUODB)
|
||||
|
||||
@@ -28,11 +28,11 @@ public class TestDeleteCascadeWithListener extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(6);
|
||||
assertThat(sql).hasSize(7);
|
||||
assertSql(sql.get(0)).contains("select t0.id from dc_detail t0 where master_id=?");
|
||||
assertSql(sql.get(1)).contains("delete from dc_detail where id=?");
|
||||
assertSqlBind(sql, 2, 4);
|
||||
assertThat(sql.get(5)).contains("delete from dc_master where id=? and version=?");
|
||||
assertThat(sql.get(6)).contains("delete from dc_master where id=? and version=?");
|
||||
}
|
||||
awaitListenerPropagation();
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TestInheritanceOrderColumn extends BaseTestCase {
|
||||
LoggedSql.start();
|
||||
DB.save(master);
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(5);
|
||||
assertThat(sql).hasSize(7);
|
||||
// Some platforms insert ids and others don't need to...
|
||||
assertSql(trimId(sql, 1))
|
||||
.contains("insert into ordered_parent (order_master_inheritance_id, dtype, common_name, ordered_aname, sort_order) values");
|
||||
@@ -53,7 +53,7 @@ public class TestInheritanceOrderColumn extends BaseTestCase {
|
||||
LoggedSql.start();
|
||||
DB.save(result);
|
||||
sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(3);
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql.get(0)).contains("update ordered_parent set sort_order=? where id=?");
|
||||
|
||||
result = DB.find(OrderMasterInheritance.class).findOne();
|
||||
|
||||
@@ -30,16 +30,16 @@ public class TestPersistCascade extends BaseTestCase {
|
||||
assertSql(sql.get(0)).contains("insert into pcf_country");
|
||||
assertSql(sql.get(1)).contains("insert into pcf_person");
|
||||
assertSqlBind(sql, 2, 7);
|
||||
assertThat(sql.get(8)).contains("insert into pcf_calendar");
|
||||
assertSqlBind(sql, 9, 20);
|
||||
assertThat(sql.get(21)).contains("insert into pcf_city");
|
||||
assertSqlBind(sql, 22, 24);
|
||||
assertThat(sql.get(25)).contains("insert into pcf_event");
|
||||
assertSqlBind(sql, 26, 45);
|
||||
assertThat(sql.get(46)).contains("insert into pcf_event");
|
||||
assertSqlBind(sql, 47, 66);
|
||||
assertThat(sql.get(67)).contains("insert into pcf_event");
|
||||
assertSqlBind(sql, 68, 87);
|
||||
assertThat(sql.get(9)).contains("insert into pcf_calendar");
|
||||
assertSqlBind(sql, 10, 21);
|
||||
assertThat(sql.get(23)).contains("insert into pcf_city");
|
||||
assertSqlBind(sql, 24, 26);
|
||||
assertThat(sql.get(28)).contains("insert into pcf_event");
|
||||
assertSqlBind(sql, 29, 48);
|
||||
assertThat(sql.get(50)).contains("insert into pcf_event");
|
||||
assertSqlBind(sql, 51, 70);
|
||||
assertThat(sql.get(72)).contains("insert into pcf_event");
|
||||
assertSqlBind(sql, 73, 87);
|
||||
}
|
||||
|
||||
country.deletePermanent();
|
||||
|
||||
@@ -75,12 +75,14 @@ public class TestM2MDeleteNoCascade extends BaseTestCase {
|
||||
DB.update(user);
|
||||
|
||||
final List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(5);
|
||||
assertThat(sql).hasSize(7);
|
||||
assertSql(sql.get(0)).contains("update mnoc_user set user_name=?, version=? where user_id=? and version=?");
|
||||
assertSql(sql.get(1)).contains("delete from mnoc_user_mnoc_role where mnoc_user_user_id = ?");
|
||||
assertSqlBind(sql.get(2));
|
||||
assertThat(sql.get(3)).contains("insert into mnoc_user_mnoc_role (mnoc_user_user_id, mnoc_role_role_id) values (?, ?)");
|
||||
assertSqlBind(sql.get(4));
|
||||
assertThat(sql.get(5)).contains("-- executeBatch");
|
||||
assertThat(sql.get(6)).contains("-- executeBatch");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -107,10 +109,10 @@ public class TestM2MDeleteNoCascade extends BaseTestCase {
|
||||
}
|
||||
|
||||
final List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(8);
|
||||
assertThat(sql).hasSize(12);
|
||||
assertSql(sql.get(0)).contains("delete from mnoc_user_mnoc_role where mnoc_user_user_id = ?");
|
||||
assertThat(sql.get(4)).contains("delete from mnoc_user_mnoc_role where mnoc_user_user_id = ?");
|
||||
assertSql(sql.get(2)).contains("delete from mnoc_user where user_id=? and version=?");
|
||||
assertThat(sql.get(6)).contains("delete from mnoc_user where user_id=? and version=?");
|
||||
assertThat(sql.get(6)).contains("delete from mnoc_user_mnoc_role where mnoc_user_user_id = ?");
|
||||
assertSql(sql.get(3)).contains("delete from mnoc_user where user_id=? and version=?");
|
||||
assertThat(sql.get(9)).contains("delete from mnoc_user where user_id=? and version=?");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,10 +63,10 @@ public class TestMergeBasic extends BaseTestCase {
|
||||
assertThat(sql.get(3)).contains("insert into uutwo (id, name, notes, version, master_id) values (?,?,?,?,?)");
|
||||
assertThat(sql.get(4)).contains("-- bind(");
|
||||
assertThat(sql.get(5)).contains("-- bind(");
|
||||
assertThat(sql.get(6)).contains("update uutwo set name=?, notes=?, version=?, master_id=? where id=? and version=?");
|
||||
assertThat(sql.get(7)).contains("-- bind(");
|
||||
assertThat(sql.get(7)).contains("update uutwo set name=?, notes=?, version=?, master_id=? where id=? and version=?");
|
||||
assertThat(sql.get(8)).contains("-- bind(");
|
||||
assertThat(sql.get(9)).contains("-- bind(");
|
||||
assertThat(sql.get(10)).contains("-- bind(");
|
||||
|
||||
} else {
|
||||
assertThat(sql.get(3)).contains("insert into uutwo (id, name, notes, version, master_id) values (?,?,?,?,?);");
|
||||
@@ -111,8 +111,8 @@ public class TestMergeBasic extends BaseTestCase {
|
||||
assertThat(sql.get(3)).contains("insert into uutwo (id, name, notes, version, master_id) values (?,?,?,?,?)");
|
||||
assertThat(sql.get(4)).contains("-- bind(");
|
||||
assertThat(sql.get(5)).contains("-- bind(");
|
||||
assertThat(sql.get(6)).contains("update uutwo set name=?, notes=?, version=?, master_id=? where id=? and version=?");
|
||||
assertThat(sql.get(9)).contains("-- bind(");
|
||||
assertThat(sql.get(7)).contains("update uutwo set name=?, notes=?, version=?, master_id=? where id=? and version=?");
|
||||
assertThat(sql.get(10)).contains("-- bind(");
|
||||
|
||||
} else {
|
||||
assertThat(sql.get(3)).contains("insert into uutwo (id, name, notes, version, master_id) values (?,?,?,?,?);");
|
||||
|
||||
@@ -92,11 +92,11 @@ public class TestMergeCustomer extends BaseTestCase {
|
||||
server().merge(mCustomer, options);
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(5);
|
||||
assertThat(sql).hasSize(6);
|
||||
assertSql(sql.get(0)).contains("select t0.id, t2.id, t1.id from mcustomer t0 left join maddress t2 on t2.id = t0.shipping_address_id left join maddress t1 on t1.id = t0.billing_address_id where t0.id = ?");
|
||||
assertSql(sql.get(1)).contains("update maddress set street=?, city=?, version=? where id=? and version=?");
|
||||
assertSqlBind(sql, 2, 3);
|
||||
assertThat(sql.get(4)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
assertThat(sql.get(5)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -121,13 +121,13 @@ public class TestMergeCustomer extends BaseTestCase {
|
||||
server().merge(mCustomer, options);
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(6);
|
||||
assertThat(sql).hasSize(8);
|
||||
assertSql(sql.get(0)).contains("select t0.id, t2.id, t1.id from mcustomer t0 left join maddress t2 on t2.id = t0.shipping_address_id left join maddress t1 on t1.id = t0.billing_address_id where t0.id = ?");
|
||||
assertSql(sql.get(1)).contains("insert into maddress (id, street, city, version) values (?,?,?,?)");
|
||||
assertSqlBind(sql.get(2));
|
||||
assertThat(sql.get(3)).contains("update maddress set street=?, city=?, version=? where id=? and version=?");
|
||||
assertSqlBind(sql.get(4));
|
||||
assertThat(sql.get(5)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
assertThat(sql.get(4)).contains("update maddress set street=?, city=?, version=? where id=? and version=?");
|
||||
assertSqlBind(sql.get(5));
|
||||
assertThat(sql.get(7)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -154,16 +154,16 @@ public class TestMergeCustomer extends BaseTestCase {
|
||||
server().merge(mCustomer, options);
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(7);
|
||||
assertThat(sql).hasSize(9);
|
||||
assertSql(sql.get(0)).contains("select t0.id, t2.id, t1.id from mcustomer t0 left join maddress t2 on t2.id = t0.shipping_address_id left join maddress t1 on t1.id = t0.billing_address_id where t0.id = ?");
|
||||
|
||||
// Additional check to see if the address with the unknown UUID is 'insert' or 'update'
|
||||
assertSql(sql.get(1)).contains("select t0.id from maddress t0 where t0.id = ?");
|
||||
assertSql(sql.get(2)).contains("insert into maddress (id, street, city, version) values (?,?,?,?)");
|
||||
assertSqlBind(sql.get(3));
|
||||
assertThat(sql.get(4)).contains("update maddress set street=?, city=?, version=? where id=? and version=?");
|
||||
assertSqlBind(sql.get(5));
|
||||
assertThat(sql.get(6)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
assertThat(sql.get(5)).contains("update maddress set street=?, city=?, version=? where id=? and version=?");
|
||||
assertSqlBind(sql.get(6));
|
||||
assertThat(sql.get(8)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -212,12 +212,12 @@ public class TestMergeCustomer extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(20);
|
||||
assertThat(sql).hasSize(26);
|
||||
}
|
||||
assertSql(sql.get(0)).contains("select t0.id, t1.id from mcustomer t0 left join mcontact t1 on t1.customer_id = t0.id where t0.id = ?");
|
||||
assertSql(sql.get(1)).contains("delete from mcontact_message where contact_id = ?");
|
||||
assertThat(sql.get(3)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(19)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
assertThat(sql.get(4)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(25)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
}
|
||||
|
||||
|
||||
@@ -238,12 +238,12 @@ public class TestMergeCustomer extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(20);
|
||||
assertThat(sql).hasSize(26);
|
||||
}
|
||||
assertSql(sql.get(0)).contains("select t0.id, t1.id from mcustomer t0 left join mcontact t1 on t1.customer_id = t0.id where t0.id = ?");
|
||||
assertSql(sql.get(1)).contains("delete from mcontact_message where contact_id = ?");
|
||||
assertThat(sql.get(3)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(19)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
assertThat(sql.get(4)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(25)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -276,17 +276,17 @@ public class TestMergeCustomer extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(16);
|
||||
assertThat(sql).hasSize(20);
|
||||
assertSql(sql.get(0)).contains("select t0.id, t1.id from mcustomer t0 left join mcontact t1 on t1.customer_id = t0.id where t0.id = ?");
|
||||
assertSql(sql.get(1)).contains("delete from mcontact_message where contact_id = ?");
|
||||
assertThat(sql.get(3)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(7)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
assertThat(sql.get(4)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(9)).contains("update mcustomer set name=?, version=?, shipping_address_id=?, billing_address_id=? where id=? and version=?");
|
||||
}
|
||||
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql.get(8)).contains("insert into mcontact");
|
||||
assertThat(sql.get(9)).contains("-- bind(");
|
||||
assertThat(sql.get(11)).contains("update mcontact set email=?, first_name=?, last_name=?, version=?, customer_id=? where id=? and version=?");
|
||||
assertThat(sql.get(10)).contains("insert into mcontact");
|
||||
assertThat(sql.get(11)).contains("-- bind(");
|
||||
assertThat(sql.get(14)).contains("update mcontact set email=?, first_name=?, last_name=?, version=?, customer_id=? where id=? and version=?");
|
||||
} else {
|
||||
assertThat(sql.get(6)).contains("update mcontact set email=?, first_name=?, last_name=?, version=?, customer_id=? where id=? and version=?");
|
||||
assertThat(sql.get(7)).contains("update mcontact set email=?, first_name=?, last_name=?, version=?, customer_id=? where id=? and version=?");
|
||||
@@ -323,15 +323,14 @@ public class TestMergeCustomer extends BaseTestCase {
|
||||
assertSql(sql.get(1)).contains("select t0.contact_id, t0.id from mcontact_message t0 where (t0.contact_id) in (?,?,?,?,?,?,?,?,?,?)");
|
||||
}
|
||||
assertSql(sql.get(2)).contains("delete from mcontact_message where contact_id = ?");
|
||||
assertThat(sql.get(4)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(5)).contains("delete from mcontact_message where contact_id = ?");
|
||||
assertThat(sql.get(7)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(5)).contains("delete from mcontact where id=?");
|
||||
assertThat(sql.get(6)).contains("delete from mcontact_message where contact_id = ?");
|
||||
assertThat(sql.get(9)).contains("delete from mcontact where id=?");
|
||||
|
||||
assertThat(sql.get(8)).contains("update maddress set street=?, city=?, version=? where id=? and version=?");
|
||||
assertThat(sql.get(13)).contains("update mcontact set email=?, first_name=?, last_name=?, version=?, customer_id=? where id=? and version=?");
|
||||
assertSqlBind(sql, 14, 17);
|
||||
assertThat(sql.get(18)).contains("update mcontact_message set title=?, subject=?, notes=?, version=?, contact_id=? where id=? and version=?");
|
||||
assertSqlBind(sql, 19, 22);
|
||||
assertThat(sql.get(10)).contains("update maddress set street=?, city=?, version=? where id=? and version=?");
|
||||
assertThat(sql.get(17)).contains("update mcontact set email=?, first_name=?, last_name=?, version=?, customer_id=? where id=? and version=?");
|
||||
assertSqlBind(sql, 18, 21);
|
||||
assertThat(sql.get(23)).contains("update mcontact_message set title=?, subject=?, notes=?, version=?, contact_id=? where id=? and version=?");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,11 +41,12 @@ public class TestMergeM2M extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(6);
|
||||
assertThat(sql).hasSize(7);
|
||||
assertSql(sql.get(0)).contains("select");
|
||||
assertSql(sql.get(1)).contains("insert into mmachine");
|
||||
assertSql(sql.get(2)).contains("insert into mmachine_mgroup");
|
||||
assertSqlBind(sql, 3, 5);
|
||||
assertSql(sql.get(6)).contains(" -- executeBatch");
|
||||
} else {
|
||||
assertThat(sql).hasSize(5);
|
||||
assertSql(sql.get(0)).contains("select");
|
||||
@@ -66,13 +67,13 @@ public class TestMergeM2M extends BaseTestCase {
|
||||
DB.merge(m1, options);
|
||||
|
||||
sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(9);
|
||||
assertThat(sql).hasSize(11);
|
||||
assertSql(sql.get(0)).contains("select");
|
||||
assertSql(sql.get(1)).contains("delete from mmachine_mgroup");
|
||||
assertSqlBind(sql, 2, 4);
|
||||
|
||||
assertThat(sql.get(5)).contains("insert into mmachine_mgroup");
|
||||
assertSqlBind(sql, 6, 7);
|
||||
assertThat(sql.get(8)).contains("update mmachine");
|
||||
assertThat(sql.get(6)).contains("insert into mmachine_mgroup");
|
||||
assertSqlBind(sql, 7, 8);
|
||||
assertThat(sql.get(10)).contains("update mmachine");
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ public class TestInsertBatchThenFlushThenUpdate extends BaseTestCase {
|
||||
txn.flush();
|
||||
|
||||
List<String> loggedSql1 = LoggedSql.start();
|
||||
assertThat(loggedSql1).hasSize(4);
|
||||
assertThat(loggedSql1).hasSize(6);
|
||||
|
||||
parent.setName("MyDesk");
|
||||
DB.save(parent);
|
||||
@@ -53,7 +53,7 @@ public class TestInsertBatchThenFlushThenUpdate extends BaseTestCase {
|
||||
|
||||
// insert statements for EdExtendedParent
|
||||
List<String> loggedSql2 = LoggedSql.start();
|
||||
assertThat(loggedSql2).hasSize(2);
|
||||
assertThat(loggedSql2).hasSize(3);
|
||||
assertThat(loggedSql2.get(0)).contains(" update td_parent ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ public class TestInsertBatchThenUpdate extends BaseTestCase {
|
||||
|
||||
// insert statements for EdExtendedParent
|
||||
List<String> loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(6);
|
||||
assertThat(loggedSql).hasSize(9);
|
||||
assertThat(loggedSql.get(0)).contains("insert into td_parent");
|
||||
assertThat(loggedSql.get(2)).contains("insert into td_child ");
|
||||
assertThat(loggedSql.get(4)).contains("update td_parent set parent_name=? where parent_id=?");
|
||||
assertThat(loggedSql.get(3)).contains("insert into td_child ");
|
||||
assertThat(loggedSql.get(6)).contains("update td_parent set parent_name=? where parent_id=?");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,9 +91,9 @@ public class TestInsertBatchThenUpdate extends BaseTestCase {
|
||||
|
||||
// insert statements for EdExtendedParent
|
||||
List<String> loggedSql = LoggedSql.stop();
|
||||
assertThat(loggedSql).hasSize(4);
|
||||
assertThat(loggedSql).hasSize(6);
|
||||
assertThat(loggedSql.get(0)).contains("insert into td_parent");
|
||||
assertThat(loggedSql.get(2)).contains("insert into td_child ");
|
||||
assertThat(loggedSql.get(3)).contains("insert into td_child ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -11,6 +11,7 @@ import org.junit.jupiter.api.Test;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class TestInsertBatchWithDifferentRootTypes extends BaseTestCase {
|
||||
@@ -63,8 +64,7 @@ public class TestInsertBatchWithDifferentRootTypes extends BaseTestCase {
|
||||
|
||||
// insert statements for EdExtendedParent
|
||||
List<String> loggedSql2 = LoggedSql.start();
|
||||
assertEquals(7, loggedSql2.size());
|
||||
|
||||
assertThat(loggedSql2).hasSize(10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@ class TestData2WithFormula extends BaseTestCase {
|
||||
DB.save(main);
|
||||
List<String> sqls = LoggedSql.stop();
|
||||
|
||||
assertThat(sqls).hasSize(3);
|
||||
assertThat(sqls).hasSize(4);
|
||||
assertThat(sqls.get(0)).contains("insert into data2_with_formula_main (id, title) values (?,?);"); // main
|
||||
assertThat(sqls.get(1)).contains("insert into data2_with_formula (main_id, meta_key, value_index, string_value) values (?,?,?,?)"); // main
|
||||
assertThat(sqls.get(2)).contains("-- bind");
|
||||
|
||||
assertThat(sqls.get(3)).contains("-- executeBatch");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class TestDataWithFormula extends BaseTestCase {
|
||||
DB.save(main);
|
||||
List<String> sqls = LoggedSql.stop();
|
||||
|
||||
assertThat(sqls).hasSize(3);
|
||||
assertThat(sqls).hasSize(4);
|
||||
assertThat(sqls.get(0)).contains("insert into data_with_formula_main (id, title) values (?,?);"); // main
|
||||
assertThat(sqls.get(1)).contains("insert into data_with_formula (main_id, meta_key, value_index, string_value) values (?,?,?,?)"); // main
|
||||
assertThat(sqls.get(2)).contains("-- bind");
|
||||
|
||||
@@ -31,7 +31,7 @@ public class EcmPersonTest extends BaseTestCase {
|
||||
|
||||
final List<String> sql = LoggedSql.stop();
|
||||
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql).hasSize(5);
|
||||
assertSql(sql.get(0)).contains("insert into ecm_person ");
|
||||
assertSql(sql.get(1)).contains("insert into ecm_person_phone_numbers ");
|
||||
assertSql(sql.get(2)).contains("-- bind");
|
||||
|
||||
@@ -30,7 +30,7 @@ public class EcsPersonTest extends BaseTestCase {
|
||||
|
||||
final List<String> sql = LoggedSql.stop();
|
||||
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql).hasSize(5);
|
||||
assertSql(sql.get(0)).contains("insert into ecs_person ");
|
||||
assertSql(sql.get(1)).contains("insert into ecs_person_phone ");
|
||||
assertSql(sql.get(2)).contains("-- bind");
|
||||
|
||||
+18
-17
@@ -28,7 +28,7 @@ class TestElementCollectionBasic extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
assertThat(eventLog()).containsOnly("preInsert", "postInsert");
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql).hasSize(5);
|
||||
|
||||
final EcPerson found = DB.find(EcPerson.class)
|
||||
.setId(person.getId())
|
||||
@@ -66,10 +66,11 @@ class TestElementCollectionBasic extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(4);
|
||||
assertThat(sql).hasSize(5);
|
||||
assertSql(sql.get(0)).contains("insert into ec_person");
|
||||
assertSql(sql.get(1)).contains("insert into ec_person_phone");
|
||||
assertSqlBind(sql, 2, 3);
|
||||
assertThat(sql.get(4)).contains("-- executeBatch");
|
||||
} else {
|
||||
assertThat(sql).hasSize(3);
|
||||
assertSql(sql.get(0)).contains("insert into ec_person");
|
||||
@@ -148,7 +149,7 @@ class TestElementCollectionBasic extends BaseTestCase {
|
||||
}
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(2);
|
||||
assertThat(sql).hasSize(3);
|
||||
assertSql(sql.get(0)).contains("update ec_person");
|
||||
|
||||
assertThat(eventLog()).containsExactly("preUpdate", "postUpdate");
|
||||
@@ -163,12 +164,12 @@ class TestElementCollectionBasic extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(7);
|
||||
assertThat(sql).hasSize(9);
|
||||
assertSql(sql.get(0)).contains("update ec_person set name=?, version=? where id=? and version=?");
|
||||
assertSql(sql.get(1)).contains("delete from ec_person_phone where owner_id=?");
|
||||
assertSqlBind(sql.get(2));
|
||||
assertThat(sql.get(3)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 4, 6);
|
||||
assertThat(sql.get(4)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 5, 7);
|
||||
|
||||
} else {
|
||||
assertThat(sql).hasSize(5);
|
||||
@@ -194,12 +195,12 @@ class TestElementCollectionBasic extends BaseTestCase {
|
||||
}
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(9);
|
||||
assertThat(sql).hasSize(12);
|
||||
assertSql(sql.get(0)).contains("update ec_person set name=?, version=? where id=? and version=?");
|
||||
assertSql(sql.get(2)).contains("delete from ec_person_phone where owner_id=?");
|
||||
assertSqlBind(sql, 3);
|
||||
assertThat(sql.get(4)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 5, 8);
|
||||
assertSql(sql.get(3)).contains("delete from ec_person_phone where owner_id=?");
|
||||
assertSqlBind(sql, 4);
|
||||
assertThat(sql.get(6)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 7, 10);
|
||||
|
||||
assertThat(eventLog()).containsExactly("preUpdate", "postUpdate");
|
||||
|
||||
@@ -226,11 +227,11 @@ class TestElementCollectionBasic extends BaseTestCase {
|
||||
}
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
assertThat(sql).hasSize(8);
|
||||
assertThat(sql).hasSize(10);
|
||||
assertSql(sql.get(0)).contains("delete from ec_person_phone where owner_id=?");
|
||||
assertSqlBind(sql, 1);
|
||||
assertSql(sql.get(2)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 3, 7);
|
||||
assertSql(sql.get(3)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 4, 8);
|
||||
|
||||
assertThat(eventLog()).containsExactly("preUpdate", "postUpdate");
|
||||
|
||||
@@ -243,11 +244,11 @@ class TestElementCollectionBasic extends BaseTestCase {
|
||||
|
||||
List<String> sql = LoggedSql.collect();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(9);
|
||||
assertThat(sql).hasSize(11);
|
||||
assertSql(sql.get(0)).contains("delete from ec_person_phone where owner_id=?");
|
||||
assertSqlBind(sql.get(1));
|
||||
assertSql(sql.get(2)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 3, 8);
|
||||
assertSql(sql.get(3)).contains("insert into ec_person_phone (owner_id,phone) values (?,?)");
|
||||
assertSqlBind(sql, 4, 9);
|
||||
|
||||
} else {
|
||||
assertThat(sql).hasSize(7);
|
||||
|
||||
+3
-3
@@ -43,8 +43,8 @@ public class TestElementCollectionBasicCache extends BaseTestCase {
|
||||
|
||||
sql = LoggedSql.collect();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(7);
|
||||
assertSqlBind(sql, 4, 6);
|
||||
assertThat(sql).hasSize(9);
|
||||
assertSqlBind(sql, 5, 7);
|
||||
} else {
|
||||
assertThat(sql).hasSize(5);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class TestElementCollectionBasicCache extends BaseTestCase {
|
||||
|
||||
sql = LoggedSql.collect();
|
||||
if (isPersistBatchOnCascade()) {
|
||||
assertThat(sql).hasSize(7); // cache hit
|
||||
assertThat(sql).hasSize(9); // cache hit
|
||||
} else {
|
||||
assertThat(sql).hasSize(5); // cache hit
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user