mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Merge remote-tracking branch 'upstream/master' into ebean-new
# Conflicts: # ebean-api/pom.xml # ebean-api/src/main/java/io/ebean/config/dbplatform/db2/DB2Platform.java # ebean-autotune/pom.xml # ebean-bom/pom.xml # ebean-core-type/pom.xml # ebean-core/pom.xml # ebean-core/src/main/java/io/ebeaninternal/server/type/DefaultTypeManager.java # ebean-ddl-generator/pom.xml # ebean-externalmapping-api/pom.xml # ebean-externalmapping-xml/pom.xml # ebean-postgis/pom.xml # ebean-querybean/pom.xml # ebean-redis/pom.xml # ebean-test/pom.xml # ebean-test/src/test/resources/ebean.properties # ebean-test/testconfig/ebean-mariadb-10.3.properties # ebean-test/testconfig/ebean-mariadb.properties # ebean-test/testconfig/ebean-mysql.properties # ebean-test/testconfig/ebean-sqlserver17.properties # ebean/pom.xml # kotlin-querybean-generator/pom.xml # pom.xml # querybean-generator/pom.xml
This commit is contained in:
@@ -22,7 +22,7 @@ jobs:
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'adopt'
|
||||
distribution: 'zulu'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
name: JDK 18-ea
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# schedule:
|
||||
# - cron: '30 6 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [18-ea]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'zulu'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
- name: Build with Maven
|
||||
run: mvn package
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
name: MariaDB 10.6
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [11]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'adopt'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
- name: mariadb 10.6
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-mariadb.properties
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
name: Multi-JDK Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 6 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [8.0.192, 8, 11.0.3, 11, 17]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'zulu'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
- name: Build with Maven
|
||||
run: mvn package
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
name: Multi-database platform test
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [11]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'adopt'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
- name: h2
|
||||
run: mvn clean test
|
||||
- name: postgres
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-postgres.properties
|
||||
- name: mysql
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-mysql.properties
|
||||
- name: sqlserver 2019
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-sqlserver19.properties
|
||||
- name: sqlserver 2017
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-sqlserver17.properties
|
||||
- name: mariadb
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-mariadb.properties
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
name: MySql
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '20 6 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [11]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'adopt'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
- name: mysql
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-mysql.properties
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
name: Postgres
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '10 6 * * *'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [11]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'adopt'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
- name: postgres
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-postgres.properties
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
name: SqlServer 2017 latest
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [11]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'adopt'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
# - name: sqlserver 2019 latest
|
||||
# run: mvn clean test -Dprops.file=testconfig/ebean-sqlserver.properties
|
||||
- name: sqlserver 2017 latest
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-sqlserver17.properties
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
name: SqlServer 2019 latest
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [11]
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: ${{ matrix.java_version }}
|
||||
distribution: 'adopt'
|
||||
- name: Maven cache
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: maven-cache
|
||||
with:
|
||||
path:
|
||||
~/.m2
|
||||
key: build-${{ env.cache-name }}
|
||||
- name: sqlserver 2019 latest
|
||||
run: mvn clean test -Dprops.file=testconfig/ebean-sqlserver19.properties
|
||||
@@ -1,5 +1,13 @@
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/build.yml)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/io.ebean/ebean)
|
||||
[](https://github.com/ebean-orm/ebean/blob/master/LICENSE)
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/multi-jdk-build.yml)
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/jdk-18-ea.yml)
|
||||
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/postgres.yml)
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/mysql.yml)
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/mariadb-10.6.yml)
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/sqlserver-2017-latest.yml)
|
||||
|
||||
# Sponsors
|
||||
<table>
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
@@ -49,7 +49,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-annotation</artifactId>
|
||||
<version>7.4-FOC3</version>
|
||||
<version>7.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
<description>ebean api</description>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--
|
||||
Projects are expected to explicit depend on version
|
||||
of slf4j that they want to use
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-config</artifactId>
|
||||
<version>1.5</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
Class retention Nonnull and Nullable annotations
|
||||
to assist with IDE auto-completion with Ebean API
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-lang</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>persistence-api</artifactId>
|
||||
<version>2.2.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-annotation</artifactId>
|
||||
<version>7.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-types</artifactId>
|
||||
<version>2.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource-api</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson core used internally by Ebean -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- provided scope for JsonNode support -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
|
||||
and not require a separate module for it -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.199</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.transaction</groupId>
|
||||
<artifactId>jta</artifactId>
|
||||
<version>1.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -2,6 +2,8 @@ package io.ebean;
|
||||
|
||||
import io.avaje.lang.NonNullApi;
|
||||
import io.avaje.lang.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
@@ -127,6 +129,13 @@ public interface DtoQuery<T> extends CancelableQuery {
|
||||
*/
|
||||
DtoQuery<T> setParameter(String name, Object value);
|
||||
|
||||
/**
|
||||
* Bind the named multi-value array parameter which we would use with Postgres ANY.
|
||||
* <p>
|
||||
* For Postgres this binds an ARRAY rather than expands into multiple bind values.
|
||||
*/
|
||||
DtoQuery<T> setArrayParameter(String name, Collection<?> values);
|
||||
|
||||
/**
|
||||
* Bind the parameter by its index position (1 based like JDBC).
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package io.ebean;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* A SqlUpdate for executing insert update or delete statements.
|
||||
* <p>
|
||||
@@ -324,6 +326,13 @@ public interface SqlUpdate {
|
||||
*/
|
||||
SqlUpdate setParameter(String name, Object param);
|
||||
|
||||
/**
|
||||
* Bind the named multi-value array parameter which we would use with Postgres ANY.
|
||||
* <p>
|
||||
* For Postgres this binds an ARRAY rather than expands into multiple bind values.
|
||||
*/
|
||||
SqlUpdate setArrayParameter(String name, Collection<?> values);
|
||||
|
||||
/**
|
||||
* Set a named parameter that has a null value. Exactly the same as
|
||||
* {@link #setNullParameter(String, int)}.
|
||||
|
||||
@@ -396,7 +396,7 @@ public class PlatformConfig {
|
||||
BINARY(false, true, false),
|
||||
|
||||
/**
|
||||
* Store using DB BINARY(16).
|
||||
* Store using DB BINARY(16) with optimized packing.
|
||||
*/
|
||||
BINARY_OPTIMIZED(false, true, true);
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ public class DB2Platform extends DatabasePlatform {
|
||||
this.platform = Platform.DB2;
|
||||
// Note: DB2 (at least LUW supports length up to 128)
|
||||
// TOOD: Check if we need to introduce a new platform (DB2_LUW_11 ?)
|
||||
this.maxTableNameLength = 128;
|
||||
this.maxConstraintNameLength = 128;
|
||||
this.maxTableNameLength = 18;
|
||||
this.maxConstraintNameLength = 18;
|
||||
this.truncateTable = "truncate table %s reuse storage ignore delete triggers immediate";
|
||||
this.sqlLimiter = new Db2SqlLimiter();
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ public class SQLitePlatform extends DatabasePlatform {
|
||||
this.dbDefaultValue.setFalse("0");
|
||||
this.dbDefaultValue.setTrue("1");
|
||||
this.dbDefaultValue.setNow("CURRENT_TIMESTAMP");
|
||||
this.supportsResultSetConcurrencyModeUpdatable = false;
|
||||
|
||||
dbTypeMap.put(DbType.BIT, new DbPlatformType("int"));
|
||||
dbTypeMap.put(DbType.BOOLEAN, new DbPlatformType("int"));
|
||||
|
||||
@@ -43,6 +43,12 @@ public interface BeanPersistRequest<T> {
|
||||
return transaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this request is due to cascading persist.
|
||||
* False implies this is a "top level" request.
|
||||
*/
|
||||
boolean isCascade();
|
||||
|
||||
/**
|
||||
* For an update or delete of a partially populated bean this is the set of
|
||||
* loaded properties and otherwise returns null.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
@@ -13,8 +13,8 @@
|
||||
<!-- </parent>-->
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:FOCONIS/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-12.13.1-FOC1</tag>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean autotune</name>
|
||||
@@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
<!-- <artifactId>java8-oss</artifactId>-->
|
||||
<!-- <version>2.2</version>-->
|
||||
<!-- </parent>-->
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean autotune</name>
|
||||
<description>ebean automatic query tuning module</description>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- needed for java 11+ -->
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:12.11.3</tile>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+15
-15
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -71,88 +71,88 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
<description>ebean bill of materials pom</description>
|
||||
<artifactId>ebean-bom</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- dependencies external to this ebean.git build -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-runner</artifactId>
|
||||
<version>${ebean-ddl-runner.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-migration-auto</artifactId>
|
||||
<version>${ebean-migration-auto.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-migration</artifactId>
|
||||
<version>${ebean-migration.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource-api</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-agent</artifactId>
|
||||
<version>${ebean-agent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-maven-plugin</artifactId>
|
||||
<version>${ebean-maven-plugin.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test-docker</artifactId>
|
||||
<version>${ebean-test-docker.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- modules -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<name>ebean core type</name>
|
||||
<description>ebean scalar types api</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+6
-6
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -14,8 +14,8 @@
|
||||
<url>https://ebean.io/</url>
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:FOCONIS/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-12.13.1-FOC1</tag>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
@@ -41,19 +41,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
<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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ebean core</name>
|
||||
<description>ebean core module</description>
|
||||
<url>https://ebean.io/</url>
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-runner</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>classpath-scanner</artifactId>
|
||||
<version>6.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-migration-auto</artifactId>
|
||||
<version>1.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4-runtime</artifactId>
|
||||
<version>4.8-1</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
Class retention Nonnull and Nullable annotations
|
||||
to assist with IDE auto-completion with Ebean API
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-jsr305-x</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Provided scope so that the H2HistoryTrigger can live in Ebean core
|
||||
and not require a separate module for it -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.199</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.transaction</groupId>
|
||||
<artifactId>javax.transaction-api</artifactId>
|
||||
<version>1.3</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- validation annotations Size etc -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.9.7</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>javax.annotation</groupId>-->
|
||||
<!-- <artifactId>javax.annotation-api</artifactId>-->
|
||||
<!-- <version>1.3.2</version>-->
|
||||
<!-- <optional>true</optional>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- Jackson core used internally by Ebean -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- Provided scope for Postgres JSON/JSONB support -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.24</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- Test scope -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-maven-plugin</artifactId>
|
||||
<version>${ebean-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test</id>
|
||||
<phase>process-test-classes</phase>
|
||||
<configuration>
|
||||
<transformArgs>debug=0</transformArgs>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>testEnhance</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M4</version>
|
||||
<configuration>
|
||||
<useSystemClassLoader>false</useSystemClassLoader>
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
<failIfNoTests>false</failIfNoTests>
|
||||
<includes>
|
||||
<include>**/Test*.java</include>
|
||||
<include>**/*Test.java</include>
|
||||
<include>**/*Tests.java</include>
|
||||
</includes>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<!-- transfer datasource.default parameter -->
|
||||
<name>datasource.default</name>
|
||||
<value>${datasource.default}</value>
|
||||
</property>
|
||||
<property>
|
||||
<!-- transfer dbClockDelta parameter -->
|
||||
<name>dbClockDelta</name>
|
||||
<value>${dbClockDelta}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<configuration>
|
||||
<doctitle>Ebean 12</doctitle>
|
||||
<overview>src/main/java/io/ebean/overview.html</overview>
|
||||
<excludePackageNames>io.ebeaninternal.*:io.ebeanservice:io.ebean.common:io.ebean.bean:io.ebean.service:io.ebean.metric:io.ebean.util:io.ebean.config.properties:io.ebean.config.dbplatform</excludePackageNames>
|
||||
<linksource>true</linksource>
|
||||
<overview>src/main/java/com/avaje/ebean/overview.html</overview>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -223,6 +223,15 @@ public final class BindParams implements Serializable {
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a named In parameter that is multi-valued.
|
||||
*/
|
||||
public Param setArrayParameter(String name, Collection<?> value) {
|
||||
Param p = getParam(name);
|
||||
p.setInValue(new MultiValueWrapper(value));
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an encryption key as a bind value.
|
||||
* <p>
|
||||
|
||||
@@ -24,6 +24,7 @@ import io.ebeaninternal.server.querydefn.OrmUpdateProperties;
|
||||
import io.ebeaninternal.server.rawsql.SpiRawSql;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -399,6 +400,11 @@ public interface SpiQuery<T> extends Query<T>, SpiQueryFetch, TxnProfileEventCod
|
||||
|
||||
List<String> getSoftDeletePredicates();
|
||||
|
||||
/**
|
||||
* Bind the named multi-value array parameter which we would use with Postgres ANY.
|
||||
*/
|
||||
void setArrayParameter(String name, Collection<?> values);
|
||||
|
||||
/**
|
||||
* Return a copy of the query.
|
||||
*/
|
||||
|
||||
@@ -331,6 +331,12 @@ public final class DefaultSqlUpdate implements Serializable, SpiSqlUpdate {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqlUpdate setArrayParameter(String name, Collection<?> values) {
|
||||
bindParams.setArrayParameter(name, values);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqlUpdate setNull(String name, int jdbcType) {
|
||||
bindParams.setNullParameter(name, jdbcType);
|
||||
|
||||
@@ -217,6 +217,11 @@ public final class PersistRequestBean<T> extends PersistRequest implements BeanP
|
||||
return beanDescriptor.docStoreMode(type, txnMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCascade() {
|
||||
return Flags.isRecurse(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the draftDirty property should be set to true for this request.
|
||||
*/
|
||||
|
||||
@@ -208,6 +208,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
private final EntityBean prototypeEntityBean;
|
||||
|
||||
private final IdBinder idBinder;
|
||||
private final String idSelect;
|
||||
private String idBinderInLHSSql;
|
||||
private String idBinderIdSql;
|
||||
private String deleteByIdSql;
|
||||
@@ -349,6 +350,23 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
propertiesIndex[i] = propMap.get(ebi.getProperty(i));
|
||||
}
|
||||
}
|
||||
idSelect = initIdSelect();
|
||||
}
|
||||
|
||||
String initIdSelect() {
|
||||
if (idProperty != null && !idProperty.name().equals("_idClass")) {
|
||||
return idProperty.name();
|
||||
} else if (entityType == EntityType.EMBEDDED) {
|
||||
return null;
|
||||
} else {
|
||||
StringJoiner sj = new StringJoiner(",");
|
||||
for (BeanProperty prop : propertiesNonMany) {
|
||||
if (prop.isImportedPrimaryKey()) {
|
||||
sj.add(prop.name());
|
||||
}
|
||||
}
|
||||
return sj.toString().intern();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isJacksonCorePresent() {
|
||||
@@ -3011,6 +3029,10 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
return idProperty;
|
||||
}
|
||||
|
||||
public String idSelect() {
|
||||
return idSelect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this bean should be inserted rather than updated.
|
||||
*
|
||||
|
||||
@@ -23,6 +23,11 @@ abstract class BeanDescriptorElement<T> extends BeanDescriptor<T> {
|
||||
this.elementHelp = elementHelp;
|
||||
}
|
||||
|
||||
@Override
|
||||
String initIdSelect() {
|
||||
return null;
|
||||
}
|
||||
|
||||
private String shortName(String name) {
|
||||
int pos = name.lastIndexOf('.');
|
||||
if (pos > 1) {
|
||||
|
||||
@@ -35,8 +35,7 @@ public final class ImportedIdEmbedded implements ImportedId {
|
||||
BeanProperty[] embeddedProps = foreignAssocOne.properties();
|
||||
for (int i = 0; i < imported.length; i++) {
|
||||
String n = name + "." + foreignAssocOne.name() + "." + embeddedProps[i].name();
|
||||
BeanFkeyProperty fkey = new BeanFkeyProperty(n, imported[i].localDbColumn, foreignAssocOne.deployOrder());
|
||||
owner.descriptor().add(fkey);
|
||||
owner.descriptor().add(new BeanFkeyProperty(n, imported[i].localDbColumn, foreignAssocOne.deployOrder()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +88,7 @@ public final class ImportedIdSimple implements ImportedId, Comparable<ImportedId
|
||||
|
||||
@Override
|
||||
public void addFkeys(String name) {
|
||||
BeanFkeyProperty fkey = new BeanFkeyProperty(name + "." + foreignProperty.name(), localDbColumn, owner.deployOrder());
|
||||
owner.descriptor().add(fkey);
|
||||
owner.descriptor().add(new BeanFkeyProperty(name + "." + foreignProperty.name(), localDbColumn, owner.deployOrder()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-1
@@ -5,7 +5,6 @@ import io.ebean.annotation.*;
|
||||
import io.ebean.core.type.ScalarType;
|
||||
import io.ebean.util.AnnotationUtil;
|
||||
import io.ebeaninternal.api.CoreLog;
|
||||
import io.ebeaninternal.server.deploy.DetermineManyType;
|
||||
import io.ebeaninternal.server.deploy.ManyType;
|
||||
import io.ebeaninternal.server.deploy.meta.*;
|
||||
import io.ebeaninternal.server.type.TypeManager;
|
||||
|
||||
@@ -174,7 +174,7 @@ public final class DeployUtil {
|
||||
*/
|
||||
void setDbArray(DeployBeanProperty prop, DbArray dbArray) {
|
||||
Class<?> type = prop.getPropertyType();
|
||||
ScalarType<?> scalarType = typeManager.getArrayScalarType(type, dbArray, prop.getGenericType(), prop.isNullable());
|
||||
ScalarType<?> scalarType = typeManager.getArrayScalarType(type, prop.getGenericType(), prop.isNullable());
|
||||
if (scalarType == null) {
|
||||
throw new RuntimeException("No ScalarType for @DbArray type for [" + prop.getFullBeanName() + "]");
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,4 +1,6 @@
|
||||
package io.ebeaninternal.server.deploy;
|
||||
package io.ebeaninternal.server.deploy.parse;
|
||||
|
||||
import io.ebeaninternal.server.deploy.ManyType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -7,9 +9,9 @@ import java.util.Set;
|
||||
/**
|
||||
* Determine the Many Type for a property.
|
||||
*/
|
||||
public final class DetermineManyType {
|
||||
final class DetermineManyType {
|
||||
|
||||
public ManyType getManyType(Class<?> type) {
|
||||
ManyType getManyType(Class<?> type) {
|
||||
if (type.equals(List.class)) {
|
||||
return ManyType.LIST;
|
||||
}
|
||||
@@ -37,8 +37,7 @@ final class DtoMetaBuilder {
|
||||
if (includeMethod(method)) {
|
||||
try {
|
||||
final String name = propertyName(method.getName());
|
||||
final Class<?> propertyType = propertyType(method);
|
||||
properties.add(new DtoMetaProperty(typeManager, dtoType, method, name, propertyType));
|
||||
properties.add(new DtoMetaProperty(typeManager, dtoType, method, name));
|
||||
} catch (Exception e) {
|
||||
CoreLog.log.debug("exclude on " + dtoType + " method " + method, e);
|
||||
}
|
||||
@@ -46,10 +45,6 @@ final class DtoMetaBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
static Class<?> propertyType(Method method) {
|
||||
return method.getParameterTypes()[0];
|
||||
}
|
||||
|
||||
static String propertyName(String methodName) {
|
||||
final String name = methodName.substring(3);
|
||||
return Character.toLowerCase(name.charAt(0)) + name.substring(1);
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.lang.invoke.MethodHandle;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.MethodType;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Type;
|
||||
import java.sql.SQLException;
|
||||
|
||||
final class DtoMetaProperty implements DtoReadSet {
|
||||
@@ -19,18 +20,30 @@ final class DtoMetaProperty implements DtoReadSet {
|
||||
private final MethodHandle setter;
|
||||
private final ScalarType<?> scalarType;
|
||||
|
||||
DtoMetaProperty(TypeManager typeManager, Class<?> dtoType, Method writeMethod, String name, Class<?> propertyType) throws IllegalAccessException, NoSuchMethodException {
|
||||
DtoMetaProperty(TypeManager typeManager, Class<?> dtoType, Method writeMethod, String name) throws IllegalAccessException, NoSuchMethodException {
|
||||
this.dtoType = dtoType;
|
||||
this.name = name;
|
||||
if (writeMethod != null) {
|
||||
this.setter = LOOKUP.findVirtual(dtoType, writeMethod.getName(), MethodType.methodType(void.class, propertyType));
|
||||
this.scalarType = typeManager.getScalarType(propertyType);
|
||||
this.setter = lookupMethodHandle(dtoType, writeMethod);
|
||||
this.scalarType = typeManager.getScalarType(propertyType(writeMethod), propertyClass(writeMethod));
|
||||
} else {
|
||||
this.scalarType = null;
|
||||
this.setter = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static MethodHandle lookupMethodHandle(Class<?> dtoType, Method method) throws NoSuchMethodException, IllegalAccessException {
|
||||
return LOOKUP.findVirtual(dtoType, method.getName(), MethodType.methodType(method.getReturnType(), method.getParameterTypes()));
|
||||
}
|
||||
|
||||
static Type propertyType(Method method) {
|
||||
return method.getParameters()[0].getParameterizedType();
|
||||
}
|
||||
|
||||
static Class<?> propertyClass(Method method) {
|
||||
return method.getParameterTypes()[0];
|
||||
}
|
||||
|
||||
String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import io.ebeaninternal.server.dto.DtoMappingRequest;
|
||||
import io.ebeaninternal.server.dto.DtoQueryPlan;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
@@ -148,6 +149,16 @@ public final class DefaultDtoQuery<T> extends AbstractQuery implements SpiDtoQue
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DtoQuery<T> setArrayParameter(String paramName, Collection<?> values) {
|
||||
if (ormQuery != null) {
|
||||
ormQuery.setArrayParameter(paramName, values);
|
||||
} else {
|
||||
bindParams.setArrayParameter(paramName, values);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DtoQuery<T> setParameters(Object... values) {
|
||||
if (ormQuery != null) {
|
||||
|
||||
@@ -586,9 +586,9 @@ public final class DefaultOrmQuery<T> extends AbstractQuery implements SpiQuery<
|
||||
*/
|
||||
@Override
|
||||
public void setSelectId() {
|
||||
// clear select and fetch joins..
|
||||
// clear select and fetch joins
|
||||
detail.clear();
|
||||
select(beanDescriptor.idBinder().getIdProperty());
|
||||
select(beanDescriptor.idSelect());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1586,6 +1586,17 @@ public final class DefaultOrmQuery<T> extends AbstractQuery implements SpiQuery<
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setArrayParameter(String name, Collection<?> values) {
|
||||
if (namedParams != null) {
|
||||
throw new IllegalStateException("setArrayParameter() not supported when EQL parsed query");
|
||||
}
|
||||
if (bindParams == null) {
|
||||
bindParams = new BindParams();
|
||||
}
|
||||
bindParams.setArrayParameter(name, values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPagingOrderBy() {
|
||||
return orderById && !useDocStore;
|
||||
|
||||
@@ -289,6 +289,18 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
return nativeMap.get(jdbcType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScalarType<?> getScalarType(Type propertyType, Class<?> propertyClass) {
|
||||
if (propertyType instanceof ParameterizedType) {
|
||||
ParameterizedType pt = (ParameterizedType)propertyType;
|
||||
Type rawType = pt.getRawType();
|
||||
if (List.class == rawType || Set.class == rawType) {
|
||||
return getArrayScalarType((Class<?>)rawType, propertyType, true);
|
||||
}
|
||||
}
|
||||
return getScalarType(propertyClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* This can return null if no matching ScalarType is found.
|
||||
*/
|
||||
@@ -327,7 +339,7 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScalarType<?> getArrayScalarType(Class<?> type, DbArray dbArray, Type genericType, boolean nullable) {
|
||||
public ScalarType<?> getArrayScalarType(Class<?> type, Type genericType, boolean nullable) {
|
||||
Type valueType = getValueType(genericType);
|
||||
if (type.equals(List.class)) {
|
||||
return getArrayScalarTypeList(valueType, nullable);
|
||||
@@ -366,12 +378,10 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
Type genericType = prop.getGenericType();
|
||||
boolean hasJacksonAnnotations = objectMapperPresent && checkJacksonAnnotations(prop);
|
||||
|
||||
boolean keepSource = prop.getMutationDetection() == MutationDetection.SOURCE
|
||||
|| (prop.getMutationDetection() == MutationDetection.DEFAULT && defaultJsonMutationDetection == MutationDetection.SOURCE);
|
||||
if (type.equals(List.class)) {
|
||||
DocPropertyType docType = getDocType(genericType);
|
||||
if (!hasJacksonAnnotations && isValueTypeSimple(genericType)) {
|
||||
return ScalarTypeJsonList.typeFor(postgres, dbType, docType, prop.isNullable(), keepSource);
|
||||
return ScalarTypeJsonList.typeFor(postgres, dbType, docType, prop.isNullable(), jsonManager.keepSource(prop));
|
||||
} else {
|
||||
return createJsonObjectMapperType(prop, dbType, docType);
|
||||
}
|
||||
@@ -379,14 +389,14 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
if (type.equals(Set.class)) {
|
||||
DocPropertyType docType = getDocType(genericType);
|
||||
if (!hasJacksonAnnotations && isValueTypeSimple(genericType)) {
|
||||
return ScalarTypeJsonSet.typeFor(postgres, dbType, docType, prop.isNullable(), keepSource);
|
||||
return ScalarTypeJsonSet.typeFor(postgres, dbType, docType, prop.isNullable(), jsonManager.keepSource(prop));
|
||||
} else {
|
||||
return createJsonObjectMapperType(prop, dbType, docType);
|
||||
}
|
||||
}
|
||||
if (type.equals(Map.class)) {
|
||||
if (!hasJacksonAnnotations && isMapValueTypeObject(genericType)) {
|
||||
return ScalarTypeJsonMap.typeFor(postgres, dbType, keepSource);
|
||||
return ScalarTypeJsonMap.typeFor(postgres, dbType, jsonManager.keepSource(prop));
|
||||
} else {
|
||||
return createJsonObjectMapperType(prop, dbType, DocPropertyType.OBJECT);
|
||||
}
|
||||
|
||||
@@ -19,8 +19,13 @@ final class JsonTrim {
|
||||
for (int i = 0; i < len; i++) {
|
||||
char c = json.charAt(i);
|
||||
if (c == '\"') {
|
||||
if (!escaped) quoted = !quoted;
|
||||
else escaped = false;
|
||||
if (!escaped) {
|
||||
quoted = !quoted;
|
||||
} else {
|
||||
escaped = false;
|
||||
}
|
||||
} else if (escaped) {
|
||||
escaped = false;
|
||||
} else if (quoted && c == '\\') {
|
||||
escaped = true;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.ebean.ModifyAwareType;
|
||||
import io.ebean.annotation.MutationDetection;
|
||||
import io.ebean.config.dbplatform.DbPlatformType;
|
||||
import io.ebeaninternal.server.deploy.meta.DeployBeanProperty;
|
||||
|
||||
final class TypeJsonManager {
|
||||
|
||||
@@ -25,6 +26,17 @@ final class TypeJsonManager {
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
boolean keepSource(DeployBeanProperty prop) {
|
||||
if (prop.getMutationDetection() == MutationDetection.SOURCE) {
|
||||
return true;
|
||||
} else if (prop.getMutationDetection() == MutationDetection.DEFAULT) {
|
||||
prop.setMutationDetection(mutationDetection);
|
||||
return mutationDetection == MutationDetection.SOURCE;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
String postgresType(int dbType) {
|
||||
if (postgres) {
|
||||
switch (dbType) {
|
||||
|
||||
@@ -47,6 +47,13 @@ public interface TypeManager {
|
||||
*/
|
||||
ScalarType<?> getScalarType(Class<?> type, int jdbcType);
|
||||
|
||||
/**
|
||||
* Find and return the ScalarType taking into account the property type with generics.
|
||||
* <p>
|
||||
* For example Array based ScalarType for types like {@code List<String>}.
|
||||
*/
|
||||
ScalarType<?> getScalarType(Type propertyType, Class<?> type);
|
||||
|
||||
/**
|
||||
* Create a ScalarType for an Enum using a mapping (rather than JPA Ordinal
|
||||
* or String which has limitations).
|
||||
@@ -64,7 +71,7 @@ public interface TypeManager {
|
||||
/**
|
||||
* Return the ScalarType used to handle DB ARRAY.
|
||||
*/
|
||||
ScalarType<?> getArrayScalarType(Class<?> type, DbArray dbArray, Type genericType, boolean nullable);
|
||||
ScalarType<?> getArrayScalarType(Class<?> type, Type genericType, boolean nullable);
|
||||
|
||||
/**
|
||||
* Return the ScalarType used to handle HSTORE (Map<String,String>).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
<description>DDL and DB Migration generation</description>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-runner</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-migration</artifactId>
|
||||
<version>12.12.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- needed for java 11+ -->
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-maven-plugin</artifactId>
|
||||
<version>${ebean-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test</id>
|
||||
<phase>process-test-classes</phase>
|
||||
<configuration>
|
||||
<transformArgs>debug=0</transformArgs>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>testEnhance</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+5
@@ -14,6 +14,7 @@ class ClickHouseDbArray {
|
||||
mapping.put("varchar[]", "Array(String)");
|
||||
mapping.put("integer[]", "Array(UInt32)");
|
||||
mapping.put("bigint[]", "Array(UInt64)");
|
||||
mapping.put("float[]", "Array(Float32)");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,6 +22,10 @@ class ClickHouseDbArray {
|
||||
*/
|
||||
static String logicalToNative(String logicalArrayType) {
|
||||
int colonPos = logicalArrayType.indexOf(':');
|
||||
int bracketPos = logicalArrayType.indexOf('(');
|
||||
if (bracketPos > -1 && (bracketPos < colonPos || colonPos == -1)) {
|
||||
colonPos = bracketPos;
|
||||
}
|
||||
if (colonPos > -1) {
|
||||
logicalArrayType = logicalArrayType.substring(0, colonPos);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean external mapping api</name>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean external mapping api</name>
|
||||
<description>API for mapping external named queries</description>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
@@ -13,8 +13,8 @@
|
||||
<!-- </parent>-->
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:FOCONIS/ebean.git</developerConnection>
|
||||
<tag>ebean-parent-12.13.1-FOC1</tag>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean external mapping xml</name>
|
||||
@@ -33,7 +33,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -59,14 +59,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
<!-- <artifactId>java8-oss</artifactId>-->
|
||||
<!-- <version>2.2</version>-->
|
||||
<!-- </parent>-->
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<name>ebean external mapping xml</name>
|
||||
<description>XML implementation for mapping external named queries</description>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>classpath-scanner</artifactId>
|
||||
<version>6.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<!-- other tiles ... -->
|
||||
<tile>io.ebean.tile:enhancement:12.11.3</tile>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?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">
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ebean-kotlin</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<ebean-maven-plugin.version>12.13.0</ebean-maven-plugin.version>
|
||||
<kotlin.version>1.6.0</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-test</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
||||
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<configuration>
|
||||
<jvmTarget>1.8</jvmTarget>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:12.13.1</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.example.domain
|
||||
|
||||
import io.ebean.Model
|
||||
import javax.persistence.Entity
|
||||
import javax.persistence.Id
|
||||
import javax.persistence.Version
|
||||
|
||||
@Entity
|
||||
class FooEntity(name: String) : Model() {
|
||||
|
||||
@Id
|
||||
var id: Long = 0
|
||||
|
||||
var name: String = name
|
||||
|
||||
@Version
|
||||
var version: Long = 0
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.example.domain
|
||||
|
||||
import io.ebean.DB
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class FooEntityTest {
|
||||
|
||||
@Test
|
||||
fun iud() {
|
||||
|
||||
val foo = FooEntity("hello")
|
||||
foo.save()
|
||||
|
||||
val found = DB.find(FooEntity::class.java, foo.id)
|
||||
assertThat(found).isNotNull
|
||||
|
||||
found?.delete()
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
ebean:
|
||||
test:
|
||||
platform: h2
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis</name>
|
||||
@@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis</name>
|
||||
<description>ebean postgis module</description>
|
||||
<url>https://ebean.io/</url>
|
||||
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
|
||||
<properties>
|
||||
<postgis.jdbc.version>2.2.1</postgis.jdbc.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.postgis</groupId>
|
||||
<artifactId>postgis-jdbc</artifactId>
|
||||
<version>[${postgis.jdbc.version}]</version>
|
||||
</dependency>
|
||||
|
||||
<!-- expected to be provided -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.24</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- expected to be provided -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- optionally use geolatte-geom -->
|
||||
<dependency>
|
||||
<groupId>org.geolatte</groupId>
|
||||
<artifactId>geolatte-geom</artifactId>
|
||||
<version>1.0.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.avaje.composite</groupId>
|
||||
<artifactId>logback</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<!-- for testing -->
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:12.11.3</tile>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -56,21 +56,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
<description>Ebean querybean support</description>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- provided scope -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
Class retention Nonnull and Nullable annotations
|
||||
to assist with IDE auto-completion with Ebean API
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-lang</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>1.6</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.avaje.composite</groupId>
|
||||
<artifactId>logback</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Enhancement -->
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:12.11.3</tile>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -22,35 +22,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<name>ebean redis</name>
|
||||
<description>Ebean Redis L2 Cache</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>redis.clients</groupId>
|
||||
<artifactId>jedis</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.avaje.composite</groupId>
|
||||
<artifactId>logback</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:12.11.3</tile>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -29,14 +29,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
<description>Testing support for Ebean</description>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test-docker</artifactId>
|
||||
<version>4.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>3.14.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Including JAXB for DB Migration generation with Java 11+ -->
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Not strictly required but bring in H2 Driver because we use it so much -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.199</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Test dependencies -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>avaje-jsr305</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-migration</artifactId>
|
||||
<version>12.12.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>mod-uuid</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.transaction</groupId>
|
||||
<artifactId>jta</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- validation annotations Size etc -->
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jakarta.validation</groupId>
|
||||
<artifactId>jakarta.validation-api</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.9.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.2.24</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.checkerframework</groupId>
|
||||
<artifactId>checker-qual</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.microsoft.sqlserver</groupId>
|
||||
<artifactId>mssql-jdbc</artifactId>
|
||||
<version>9.4.0.jre8</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.26</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
<artifactId>mariadb-java-client</artifactId>
|
||||
<version>2.6.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sap.cloud.db.jdbc</groupId>
|
||||
<artifactId>ngdbc</artifactId>
|
||||
<version>2.3.48</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<!-- Note: Using ojdbc10 here will affect loading other drivers on jdk8,
|
||||
because the driverManager will stop on first load error and stops loading
|
||||
other drivers -->
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>19.12.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ibm.db2</groupId>
|
||||
<artifactId>jcc</artifactId>
|
||||
<version>11.5.6.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.xerial</groupId>
|
||||
<artifactId>sqlite-jdbc</artifactId>
|
||||
<version>3.36.0.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.nuodb.jdbc</groupId>
|
||||
<artifactId>nuodb-jdbc</artifactId>
|
||||
<version>22.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ru.yandex.clickhouse</groupId>
|
||||
<artifactId>clickhouse-jdbc</artifactId>
|
||||
<version>0.3.1-patch</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.2.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:12.11.3</tile>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -208,19 +208,33 @@ public class DtoQueryTest extends BaseTestCase {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
LoggedSql.start();
|
||||
List<Integer> ids = Arrays.asList(1, 2);
|
||||
|
||||
List<DCust> list = server().findDto(DCust.class, "select id, name from o_customer where id = any(?)")
|
||||
List<DCust> list = DB.findDto(DCust.class, "select id, name from o_customer where id = any(?)")
|
||||
.setParameter(ids)
|
||||
.findList();
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
|
||||
list = server().findDto(DCust.class, "select id, name from o_customer where id in (:idList)")
|
||||
List<DCust> list1 = DB.findDto(DCust.class, "select id, name from o_customer where id in (:idList)")
|
||||
.setParameter("idList", ids)
|
||||
.findList();
|
||||
|
||||
assertThat(list).isNotEmpty();
|
||||
assertThat(list1).isNotEmpty();
|
||||
|
||||
|
||||
List<DCust> list2 = DB.findDto(DCust.class, "select id, name from o_customer where id = any(:idList)")
|
||||
.setArrayParameter("idList", ids)
|
||||
.findList();
|
||||
|
||||
assertThat(list2).isNotEmpty();
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(3);
|
||||
assertThat(sql.get(0)).contains(" id = any(?)");
|
||||
assertThat(sql.get(1)).contains(" id in (?,?)");
|
||||
assertThat(sql.get(2)).contains(" id = any(?)");
|
||||
}
|
||||
|
||||
@ForPlatform(Platform.POSTGRES)
|
||||
|
||||
@@ -34,8 +34,10 @@ public class DtoMetaBuilderTest {
|
||||
Map<String, Method> methods = getIncludedMethodsFor(D0.class);
|
||||
|
||||
assertThat(methods).hasSize(2);
|
||||
assertThat(DtoMetaBuilder.propertyType(methods.get("setName"))).isEqualTo(String.class);
|
||||
assertThat(DtoMetaBuilder.propertyType(methods.get("setId"))).isEqualTo(long.class);
|
||||
assertThat(DtoMetaProperty.propertyClass(methods.get("setName"))).isEqualTo(String.class);
|
||||
assertThat(DtoMetaProperty.propertyClass(methods.get("setId"))).isEqualTo(long.class);
|
||||
assertThat(DtoMetaProperty.propertyType(methods.get("setName"))).isEqualTo(String.class);
|
||||
assertThat(DtoMetaProperty.propertyType(methods.get("setId"))).isEqualTo(long.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+14
-7
@@ -5,25 +5,32 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class BasicProfileLocationTest {
|
||||
class BasicProfileLocationTest {
|
||||
|
||||
@Test
|
||||
public void obtain() {
|
||||
void obtain() {
|
||||
|
||||
DProfileLocation loc = new DTimedProfileLocation(12, "foo", MetricFactory.get().createTimedMetric("junk"));
|
||||
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
assertThat(loc.obtain()).isTrue();
|
||||
assertThat(loc.fullLocation()).endsWith(":12)");
|
||||
if (System.getProperty("java.version").startsWith("1.8")) {
|
||||
if (javaVersion.startsWith("1.8")) {
|
||||
assertThat(loc.fullLocation()).endsWith("invoke0(Native Method:12)");
|
||||
assertThat(loc.location()).isEqualTo("sun.reflect.NativeMethodAccessorImpl.invoke0");
|
||||
assertThat(loc.label()).isEqualTo("NativeMethodAccessorImpl.invoke0");
|
||||
} else if (javaVersion.startsWith("18")){
|
||||
assertThat(loc.fullLocation()).endsWith("jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)");
|
||||
assertThat(loc.location()).isEqualTo("java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke");
|
||||
assertThat(loc.label()).isEqualTo("DirectMethodHandleAccessor.invoke");
|
||||
} else {
|
||||
assertThat(loc.fullLocation()).endsWith("jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method:12)");
|
||||
assertThat(loc.location()).isEqualTo("java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0");
|
||||
assertThat(loc.label()).isEqualTo("NativeMethodAccessorImpl.invoke0");
|
||||
}
|
||||
assertThat(loc.label()).isEqualTo("NativeMethodAccessorImpl.invoke0");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void basic_trimPackage() {
|
||||
void basic_trimPackage() {
|
||||
|
||||
BasicProfileLocation loc = new BasicProfileLocation("com.foo.Bar.all");
|
||||
assertThat(loc.obtain()).isFalse();
|
||||
@@ -33,7 +40,7 @@ public class BasicProfileLocationTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void basic_trimSinglePackage() {
|
||||
void basic_trimSinglePackage() {
|
||||
|
||||
BasicProfileLocation loc = new BasicProfileLocation("foo.Bar.all");
|
||||
assertThat(loc.obtain()).isFalse();
|
||||
|
||||
@@ -5,17 +5,59 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class JsonTrimTest {
|
||||
class JsonTrimTest {
|
||||
|
||||
@Test
|
||||
public void trim_array() {
|
||||
void trim_array() {
|
||||
final String trimmed = JsonTrim.trim("[{\"name\": \"one\", \"along\": 1, \"timestamp\": 1629609021559}, {\"name\": \"two\", \"along\": 2, \"timestamp\": 1629609021559}]");
|
||||
assertThat(trimmed).isEqualTo("[{\"name\":\"one\",\"along\":1,\"timestamp\":1629609021559},{\"name\":\"two\",\"along\":2,\"timestamp\":1629609021559}]");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void trim_object() {
|
||||
void trim_object() {
|
||||
final String trimmed = JsonTrim.trim("{\"name\": \"one\",\t \t \"along\": 1, \"timestamp\": 1629609021559}");
|
||||
assertThat(trimmed).isEqualTo("{\"name\":\"one\",\"along\":1,\"timestamp\":1629609021559}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_object_embeddedEscapeSlash() {
|
||||
final String trimmed = JsonTrim.trim("{\"a\": \"o\\nf\",\t \t \n \"b\": 1}");
|
||||
assertThat(trimmed).isEqualTo("{\"a\":\"o\\nf\",\"b\":1}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_escapedTabNewLine() {
|
||||
final String trimmed = JsonTrim.trim("{\"a\": \"o\\t\\nf\",\t \t \n \"b\": 1}");
|
||||
assertThat(trimmed).isEqualTo("{\"a\":\"o\\t\\nf\",\"b\":1}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_leadingEscapedNewLine() {
|
||||
final String trimmed = JsonTrim.trim("{\"a\": \"\\no\\t\\nf\\n\",\t \t \n \"b\": 1}");
|
||||
assertThat(trimmed).isEqualTo("{\"a\":\"\\no\\t\\nf\\n\",\"b\":1}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_trailingEscapedNewLine() {
|
||||
final String trimmed = JsonTrim.trim("{\"a\": \"o\\t\\nf\\n\",\t \t \n \"b\": 1}");
|
||||
assertThat(trimmed).isEqualTo("{\"a\":\"o\\t\\nf\\n\",\"b\":1}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_trailingEscapedSlash() {
|
||||
final String trimmed = JsonTrim.trim("{\"a\": \"o\\t\\nf\\\\\",\t \t \n \"b\": 1}");
|
||||
assertThat(trimmed).isEqualTo("{\"a\":\"o\\t\\nf\\\\\",\"b\":1}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_object_embeddedEscaped() {
|
||||
final String trimmed = JsonTrim.trim("{\"name\": \"one\nfoo\nbar\\bazz\tboo\",\t \t \n \"along\": 1}");
|
||||
assertThat(trimmed).isEqualTo("{\"name\":\"one\nfoo\nbar\\bazz\tboo\",\"along\":1}");
|
||||
}
|
||||
|
||||
@Test
|
||||
void trim_escaped() {
|
||||
final String trimmed = JsonTrim.trim(" \t \n {\"a\": \n \"\\t1\\t2\\n3\\\\\",\t \n \"b\": \"\\t1\\t2\\n3\\\\\" , \t \n \"c\": \"\\t1\\t2\\n3\\\\\" \t \n }");
|
||||
assertThat(trimmed).isEqualTo("{\"a\":\"\\t1\\t2\\n3\\\\\",\"b\":\"\\t1\\t2\\n3\\\\\",\"c\":\"\\t1\\t2\\n3\\\\\"}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,13 +13,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class TestLoadBeanCache extends BaseTestCase {
|
||||
class TestLoadBeanCache extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void testLoad() {
|
||||
void testLoad() {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
@@ -35,32 +34,29 @@ public class TestLoadBeanCache extends BaseTestCase {
|
||||
// this will hit the cache
|
||||
Country nz = DB.find(Country.class, "NZ");
|
||||
|
||||
assertTrue(loadedNz == nz);
|
||||
assertSame(loadedNz, nz);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testLoadWithFindMap() {
|
||||
void testLoadWithFindMap() {
|
||||
|
||||
ResetBasicData.reset();
|
||||
|
||||
|
||||
List<Object> ids = DB.find(Customer.class).findIds();
|
||||
assertEquals(ids.size(), 4);
|
||||
assertThat(ids).isNotEmpty();
|
||||
|
||||
DB.getDefault().pluginApi().cacheManager().clearAll();
|
||||
|
||||
|
||||
// hit database
|
||||
LoggedSql.start();
|
||||
DB.find(Customer.class).where().idIn(ids).findMap();
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(1);
|
||||
|
||||
|
||||
// hit beanCache
|
||||
LoggedSql.start();
|
||||
DB.find(Customer.class).where().idIn(ids).findMap();
|
||||
sql = LoggedSql.stop();
|
||||
assertThat(sql).hasSize(0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,13 +5,15 @@ import io.ebean.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.TWithPreInsert;
|
||||
import org.tests.model.basic.TWithPreInsertChild;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
public class TestPreInsertValidation extends BaseTestCase {
|
||||
class TestPreInsertValidation extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
void test() {
|
||||
|
||||
TWithPreInsert e = new TWithPreInsert();
|
||||
e.setTitle("Mister");
|
||||
@@ -22,15 +24,45 @@ public class TestPreInsertValidation extends BaseTestCase {
|
||||
// the save worked and name set in preInsert
|
||||
assertNotNull(e.getId());
|
||||
assertNotNull(e.getName());
|
||||
assertThat(e.requestCascadeState()).isEqualTo(2);
|
||||
|
||||
TWithPreInsert e1 = DB.find(TWithPreInsert.class, e.getId());
|
||||
|
||||
e1.setTitle("Missus");
|
||||
DB.save(e1);
|
||||
|
||||
assertThat(e1.requestCascadeState()).isEqualTo(12);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStatelessUpdate() {
|
||||
void test_cascade() {
|
||||
|
||||
TWithPreInsert e = new TWithPreInsert();
|
||||
e.setTitle("ParentCascading");
|
||||
e.children().add(new TWithPreInsertChild("Child0"));
|
||||
// the perInsert should populate the
|
||||
// name with should not be null
|
||||
DB.save(e);
|
||||
|
||||
// the save worked and name set in preInsert
|
||||
assertNotNull(e.getId());
|
||||
assertNotNull(e.getName());
|
||||
assertThat(e.requestCascadeState()).isEqualTo(2);
|
||||
assertThat(e.children().get(0).requestCascadeState()).isEqualTo(1);
|
||||
|
||||
TWithPreInsert e1 = DB.find(TWithPreInsert.class, e.getId());
|
||||
assert e1 != null;
|
||||
|
||||
e1.setTitle("ParentCascading-changed");
|
||||
e1.children().get(0).setName("Child0-changed");
|
||||
DB.save(e1);
|
||||
|
||||
assertThat(e1.requestCascadeState()).isEqualTo(12);
|
||||
assertThat(e1.children().get(0).requestCascadeState()).isEqualTo(11);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testStatelessUpdate() {
|
||||
|
||||
TWithPreInsert e = new TWithPreInsert();
|
||||
e.setName("BeanForUpdateTest");
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package org.tests.json;
|
||||
|
||||
import io.ebean.Database;
|
||||
import io.ebean.DatabaseFactory;
|
||||
import io.ebean.ValuePair;
|
||||
import io.ebean.annotation.ForPlatform;
|
||||
import io.ebean.annotation.MutationDetection;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.config.DatabaseConfig;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.json.EBasicJsonList;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class TestJsonSourceDefault {
|
||||
|
||||
@Test
|
||||
@ForPlatform(Platform.H2)
|
||||
@Disabled
|
||||
void testDirtyValues_diffSource() {
|
||||
DatabaseConfig config = new DatabaseConfig();
|
||||
config.getDataSourceConfig()
|
||||
.setUsername("sa")
|
||||
.setPassword("")
|
||||
.setUrl("jdbc:h2:mem:testJsonSourceDirtyValues");
|
||||
|
||||
config.setName("jsonSource");
|
||||
config.setDefaultServer(false);
|
||||
config.setRegister(false);
|
||||
config.setDdlGenerate(true);
|
||||
config.setDdlRun(true);
|
||||
config.setDdlExtra(false);
|
||||
config.addClass(EBasicJsonList.class);
|
||||
config.setJsonMutationDetection(MutationDetection.SOURCE);
|
||||
Database db = DatabaseFactory.create(config);
|
||||
try {
|
||||
assertThat(db).isNotNull();
|
||||
|
||||
EBasicJsonList bean = new EBasicJsonList();
|
||||
bean.getTags().add("aa");
|
||||
bean.getTags().add("bb");
|
||||
|
||||
db.save(bean);
|
||||
bean = db.find(EBasicJsonList.class, bean.getId());
|
||||
|
||||
bean.getTags().add("cc");
|
||||
final Map<String, ValuePair> dirtyValues = db.beanState(bean).dirtyValues();
|
||||
assertThat(dirtyValues).containsOnlyKeys("tags");
|
||||
|
||||
final ValuePair diff = dirtyValues.get("tags");
|
||||
assertThat(diff.getOldValue()).isInstanceOf(List.class).asList().containsExactly("aa", "bb");
|
||||
assertThat(diff.getNewValue()).isInstanceOf(List.class).asList().containsExactly("aa", "bb", "cc");
|
||||
} finally {
|
||||
if (db != null) {
|
||||
db.shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package org.tests.model.array;
|
||||
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Query;
|
||||
import io.ebean.SqlRow;
|
||||
import io.ebean.*;
|
||||
import io.ebean.annotation.ForPlatform;
|
||||
import io.ebean.annotation.IgnorePlatform;
|
||||
import io.ebean.annotation.Platform;
|
||||
@@ -272,4 +269,123 @@ public class TestDbArray_basic extends BaseTestCase {
|
||||
assertThat(found.getUids()).hasSameElementsAs(uids);
|
||||
assertThat(found.getStatuses()).hasSameElementsAs(statuses);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ForPlatform(Platform.POSTGRES)
|
||||
public void asDto_withArray() {
|
||||
DB.find(EArrayBean.class).delete();
|
||||
bean.setName("array in dto test");
|
||||
|
||||
List<String> phNumbers = bean.getPhoneNumbers();
|
||||
phNumbers.add("4321");
|
||||
phNumbers.add("9823");
|
||||
List<Double> doubs = bean.getDoubs();
|
||||
doubs.add(1.23);
|
||||
doubs.add(4.56);
|
||||
DB.save(bean);
|
||||
// Data is saved correctly
|
||||
|
||||
LoggedSql.start();
|
||||
DtoQuery<EArrayBeanDto> query = DB.find(EArrayBean.class)
|
||||
// Interestingly writing `select("id,name,phone_numbers,doubs")`
|
||||
// generates `select t0.id, t0.name, t0.id, t0.doubs`
|
||||
// surprisingly changing unknown property to id
|
||||
.select("id,name,phoneNumbers,doubs")
|
||||
.asDto(EArrayBeanDto.class)
|
||||
// Shouldn't be necessary
|
||||
// But without it I see error
|
||||
// Unable to map DB column phone_numbers to a property with a setter method on class org.tests.model.array.TestDbArray_basic$EArrayBeanDto
|
||||
.setRelaxedMode();
|
||||
|
||||
List<EArrayBeanDto> dtos = query.findList();
|
||||
|
||||
List<String> sql = LoggedSql.stop();
|
||||
assertSql(sql.get(0)).contains("select t0.id, t0.name, t0.phone_numbers, t0.doubs");
|
||||
|
||||
for (EArrayBeanDto dto : dtos) {
|
||||
assertThat(dto.id).isNotNull();
|
||||
assertThat(dto.name).isNotNull();
|
||||
// Failure: null
|
||||
assertThat(dto.phoneNumbers).isNotNull();
|
||||
// Failure: null
|
||||
assertThat(dto.doubs).isNotNull();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@ForPlatform(Platform.POSTGRES)
|
||||
public void sqlUpdate_withArray() {
|
||||
DB.find(EArrayBean.class).delete();
|
||||
bean.setName("array in sql update test");
|
||||
DB.save(bean);
|
||||
// Data is saved correctly
|
||||
List<String> phNumbers = new ArrayList<>();
|
||||
phNumbers.add("4321");
|
||||
phNumbers.add("9823");
|
||||
|
||||
LoggedSql.start();
|
||||
|
||||
// Positional param works
|
||||
SqlUpdate update1 = DB.sqlUpdate("UPDATE earray_bean SET phone_numbers = ?")
|
||||
.setParameter(1, phNumbers);
|
||||
update1.execute();
|
||||
System.out.println("done");
|
||||
|
||||
// Named param fails with
|
||||
// javax.persistence.PersistenceException:
|
||||
// ERROR: syntax error at or near "$2"
|
||||
SqlUpdate update2 = DB.sqlUpdate("UPDATE earray_bean SET phone_numbers = :pns")
|
||||
.setArrayParameter("pns", phNumbers);
|
||||
update2.execute();
|
||||
|
||||
found = DB.find(EArrayBean.class, bean.getId());
|
||||
System.out.println(found);
|
||||
assertEquals("array in sql update test", found.getName());
|
||||
assertThat(found.getPhoneNumbers()).containsExactly("4321", "9823");
|
||||
}
|
||||
|
||||
public static class EArrayBeanDto {
|
||||
|
||||
Integer id;
|
||||
List<String> phoneNumbers;
|
||||
List<Double> doubs;
|
||||
String name;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "id:" + id + " name:" + name + " phoneNumbers:" + phoneNumbers + " doubs:" + doubs;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<String> getPhoneNumbers() {
|
||||
return phoneNumbers;
|
||||
}
|
||||
|
||||
public void setPhoneNumbers(List<String> phoneNumbers) {
|
||||
this.phoneNumbers = phoneNumbers;
|
||||
}
|
||||
|
||||
public List<Double> getDoubs() {
|
||||
return doubs;
|
||||
}
|
||||
|
||||
public void setDoubs(List<Double> doubs) {
|
||||
this.doubs = doubs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,15 @@ package org.tests.model.basic;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static javax.persistence.CascadeType.PERSIST;
|
||||
|
||||
@Entity
|
||||
public class TWithPreInsert {
|
||||
public class TWithPreInsert implements TWithPreInsertCommon {
|
||||
|
||||
@Id
|
||||
private Integer id;
|
||||
@@ -15,6 +20,14 @@ public class TWithPreInsert {
|
||||
|
||||
private String title;
|
||||
|
||||
@OneToMany(cascade = PERSIST)
|
||||
private List<TWithPreInsertChild> children = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* For testing what happened in persist controller.
|
||||
*/
|
||||
transient int requestCascadeState;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -39,4 +52,15 @@ public class TWithPreInsert {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public List<TWithPreInsertChild> children() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public int requestCascadeState() {
|
||||
return requestCascadeState;
|
||||
}
|
||||
|
||||
public void requestCascadeState(int requestCascadeState) {
|
||||
this.requestCascadeState = requestCascadeState;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package org.tests.model.basic;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Entity
|
||||
public class TWithPreInsertChild implements TWithPreInsertCommon {
|
||||
|
||||
@Id
|
||||
private Integer id;
|
||||
|
||||
@NotNull
|
||||
private String name;
|
||||
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* For testing what happened in persist controller.
|
||||
*/
|
||||
transient int requestCascadeState;
|
||||
|
||||
public TWithPreInsertChild(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public int requestCascadeState() {
|
||||
return requestCascadeState;
|
||||
}
|
||||
|
||||
public void requestCascadeState(int requestCascadeState) {
|
||||
this.requestCascadeState = requestCascadeState;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.tests.model.basic;
|
||||
|
||||
public interface TWithPreInsertCommon {
|
||||
|
||||
String getName();
|
||||
|
||||
void setName(String name);
|
||||
|
||||
String getTitle();
|
||||
|
||||
void setTitle(String title);
|
||||
|
||||
void requestCascadeState(int requestCascadeState);
|
||||
}
|
||||
+11
-14
@@ -2,36 +2,33 @@ package org.tests.model.basic.event;
|
||||
|
||||
import io.ebean.event.BeanPersistAdapter;
|
||||
import io.ebean.event.BeanPersistRequest;
|
||||
import org.tests.model.basic.TWithPreInsert;
|
||||
import org.tests.model.basic.TWithPreInsertCommon;
|
||||
|
||||
public class TWithPreInsertPersistAdapter extends BeanPersistAdapter {
|
||||
|
||||
@Override
|
||||
public boolean isRegisterFor(Class<?> cls) {
|
||||
return TWithPreInsert.class.equals(cls);
|
||||
return TWithPreInsertCommon.class.isAssignableFrom(cls);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preInsert(BeanPersistRequest<?> request) {
|
||||
|
||||
TWithPreInsert e = (TWithPreInsert) request.bean();
|
||||
if (e.getName() == null) {
|
||||
e.setName("set on preInsert");
|
||||
TWithPreInsertCommon bean = (TWithPreInsertCommon) request.bean();
|
||||
if (bean.getName() == null) {
|
||||
bean.setName("set on preInsert");
|
||||
}
|
||||
bean.requestCascadeState(request.isCascade() ? 1 : 2);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preUpdate(BeanPersistRequest<?> request) {
|
||||
|
||||
TWithPreInsert b = (TWithPreInsert) request.bean();
|
||||
System.out.println("preUpdate - title is: " + b.getTitle());
|
||||
if (b.getTitle() == null) {
|
||||
b.setTitle("set on preUpdate");
|
||||
TWithPreInsertCommon bean = (TWithPreInsertCommon) request.bean();
|
||||
System.out.println("preUpdate - title is: " + bean.getTitle());
|
||||
if (bean.getTitle() == null) {
|
||||
bean.setTitle("set on preUpdate");
|
||||
}
|
||||
// request.getEbeanServer().refresh(b);
|
||||
// System.out.println("title is Mister:"+b.getTitle());
|
||||
|
||||
bean.requestCascadeState(request.isCascade() ? 11 : 12);
|
||||
return super.preUpdate(request);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,18 +6,19 @@ import io.ebean.Transaction;
|
||||
import io.ebean.test.LoggedSql;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestIdClassScalar extends BaseTestCase {
|
||||
class TestIdClassScalar extends BaseTestCase {
|
||||
|
||||
private BUser user = new BUser("Fiona");
|
||||
private BSite site = new BSite("avaje.io");
|
||||
private final BUser user = new BUser("Fiona");
|
||||
private final BSite site = new BSite("avaje.io");
|
||||
|
||||
@Test
|
||||
public void testBEmbId_equalsHashcode() {
|
||||
void testBEmbId_equalsHashcode() {
|
||||
|
||||
BEmbId a = new BEmbId(UUID.randomUUID(), UUID.randomUUID());
|
||||
BEmbId b = new BEmbId(a.getSiteId(), a.getUserId());
|
||||
@@ -35,13 +36,11 @@ public class TestIdClassScalar extends BaseTestCase {
|
||||
assertThat(a).isNotEqualTo(d);
|
||||
assertThat(a.hashCode()).isNotEqualTo(d.hashCode());
|
||||
|
||||
|
||||
assertThat(a.hashCode()).isEqualTo(a.otherHash());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fetchMany() {
|
||||
void fetchMany() {
|
||||
UUID siteId = UUID.randomUUID();
|
||||
UUID userId = UUID.randomUUID();
|
||||
|
||||
@@ -59,7 +58,7 @@ public class TestIdClassScalar extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void insertBatch() {
|
||||
void insertBatch() {
|
||||
UUID siteId = UUID.randomUUID();
|
||||
UUID userId = UUID.randomUUID();
|
||||
|
||||
@@ -81,11 +80,9 @@ public class TestIdClassScalar extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
void test() {
|
||||
DB.save(user);
|
||||
DB.save(site);
|
||||
|
||||
insertUpdateBridgeD(user, site);
|
||||
insertUpdateBridgeE(user, site);
|
||||
}
|
||||
@@ -94,7 +91,6 @@ public class TestIdClassScalar extends BaseTestCase {
|
||||
* Test where matching by db column naming convention.
|
||||
*/
|
||||
private void insertUpdateBridgeD(BUser user, BSite site) {
|
||||
|
||||
LoggedSql.start();
|
||||
|
||||
BSiteUserD access = new BSiteUserD(BAccessLevel.ONE, site.id, user.id);
|
||||
@@ -139,7 +135,6 @@ public class TestIdClassScalar extends BaseTestCase {
|
||||
* Test where matching by db column naming convention.
|
||||
*/
|
||||
private void insertUpdateBridgeE(BUser user, BSite site) {
|
||||
|
||||
LoggedSql.start();
|
||||
|
||||
BSiteUserE access = new BSiteUserE(BAccessLevel.ONE, site, user);
|
||||
@@ -181,4 +176,47 @@ public class TestIdClassScalar extends BaseTestCase {
|
||||
assertSql(sql.get(1)).contains("update bsite_user_e set access_level=? where site_id=? and user_id=?");
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
void idClass_existsQuery() {
|
||||
BUser user = new BUser("JunkUser2");
|
||||
BSite site = new BSite("JunkSite2");
|
||||
BSiteUserE access = new BSiteUserE(BAccessLevel.ONE, site, user);
|
||||
|
||||
DB.save(user);
|
||||
DB.save(site);
|
||||
DB.save(access);
|
||||
|
||||
boolean exists = DB.find(BSiteUserE.class)
|
||||
.where().eq("user.id", user.id)
|
||||
.exists();
|
||||
|
||||
assertThat(exists).isTrue();
|
||||
assertThat(DB.find(BSiteUserE.class).where().eq("user.id", user.id).findCount()).isEqualTo(1);
|
||||
|
||||
DB.delete(access);
|
||||
DB.deleteAll(Arrays.asList(user, site));
|
||||
}
|
||||
|
||||
@Test
|
||||
void idClass_existsQuery_scalarImportedProperties() {
|
||||
BUser user = new BUser("JunkUser3");
|
||||
BSite site = new BSite("JunkSite3");
|
||||
DB.save(user);
|
||||
DB.save(site);
|
||||
|
||||
BSiteUserD access = new BSiteUserD(BAccessLevel.ONE, site.id, user.id);
|
||||
DB.save(access);
|
||||
|
||||
boolean exists = DB.find(BSiteUserD.class)
|
||||
.where().eq("userId", user.id)
|
||||
.exists();
|
||||
|
||||
assertThat(exists).isTrue();
|
||||
assertThat(DB.find(BSiteUserD.class).where().eq("userId", user.id).findCount()).isEqualTo(1);
|
||||
|
||||
DB.delete(access);
|
||||
DB.deleteAll(Arrays.asList(user, site));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-5
@@ -10,11 +10,10 @@ import java.util.Set;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestElementCollectionBasicSet extends BaseTestCase {
|
||||
class TestElementCollectionBasicSet extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
void test() {
|
||||
LoggedSql.start();
|
||||
|
||||
EcsPerson person = new EcsPerson("Fiona021");
|
||||
@@ -172,8 +171,7 @@ public class TestElementCollectionBasicSet extends BaseTestCase {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void json() {
|
||||
|
||||
void json() {
|
||||
EcsPerson person = new EcsPerson("Fiona021");
|
||||
person.getPhoneNumbers().add("021 1234");
|
||||
person.getPhoneNumbers().add("021 4321");
|
||||
|
||||
@@ -25,7 +25,7 @@ ebean.packages=org.tests,org.etest
|
||||
datasource.default=h2
|
||||
#datasource.h2.capturestacktrace=true
|
||||
|
||||
ebean.dumpMetricsOnShutdown=true
|
||||
#ebean.dumpMetricsOnShutdown=true
|
||||
ebean.dumpMetricsOptions=sql,hash,loc
|
||||
#ebean.queryPlan.thresholdMicros=1000
|
||||
ebean.queryPlan.enable=true
|
||||
@@ -182,7 +182,7 @@ datasource.nuodb.url=jdbc:com.nuodb://localhost/testdb
|
||||
#datasource.nuodb.driver=com.nuodb.jdbc.Driver
|
||||
|
||||
datasource.db2.username=unit
|
||||
datasource.db2.password=unit
|
||||
datasource.db2.password=test
|
||||
datasource.db2.url=jdbc:db2://127.0.0.1:50000/unit
|
||||
#datasource.db2.driver=com.ibm.db2.jcc.DB2Driver
|
||||
|
||||
|
||||
@@ -4,5 +4,5 @@ ebean.test.dbName=test_ebean
|
||||
ebean.test.dbPassword=unit
|
||||
ebean.test.mariadb.version=10.3
|
||||
ebean.test.mariadb.containerName=ut_mariadb-10-3
|
||||
ebean.test.sqlserver.port = 7306
|
||||
ebean.test.mariadb.port=14308
|
||||
datasource.default=mariadb-103
|
||||
|
||||
@@ -2,4 +2,5 @@ ebean.test.platform=mariadb
|
||||
ebean.test.dbName=test_ebean
|
||||
ebean.test.mariadb.version=10.6
|
||||
ebean.test.mariadb.containerName=ut_mariadb-10-6
|
||||
ebean.test.mariadb.port=14307
|
||||
datasource.default=mariadb-106
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
ebean.test.platform=mysql
|
||||
ebean.test.dbName=test_ebean
|
||||
# note: do not conflict with mariadb port
|
||||
ebean.test.sqlserver.port = 13306
|
||||
#ebean.test.mysql.port=4306
|
||||
datasource.default=mysql-docker
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
ebean.test.platform=sqlserver
|
||||
ebean.test.dbName=test_ebean
|
||||
ebean.test.sqlserver.version=2017-latest
|
||||
ebean.test.sqlserver.containerName=ut_sqlserver2017
|
||||
ebean.test.sqlserver.port=1434
|
||||
ebean.test.sqlserver.containerName=local_sqlserver2017
|
||||
ebean.test.sqlserver.collation=LATIN1_GENERAL_100_CS_AS_SC
|
||||
ebean.test.sqlserver.port=9435
|
||||
ebean.test.sqlserver.url=jdbc:sqlserver://localhost:9435;databaseName=test_ebean;sendTimeAsDateTime=false
|
||||
|
||||
datasource.default=sqlserver2017
|
||||
ebean.sqlserver2017.databasePlatformName=sqlserver17
|
||||
ebean.sqlserver2017.databasePlatformName=sqlserver17
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
ebean.test.platform=sqlserver
|
||||
ebean.test.dbName=test_ebean
|
||||
ebean.test.sqlserver.version=2019-latest
|
||||
ebean.test.sqlserver.containerName=local_sqlserver2019
|
||||
ebean.test.sqlserver.collation=LATIN1_GENERAL_100_CS_AS_SC_UTF8
|
||||
ebean.test.sqlserver.port=9434
|
||||
ebean.test.sqlserver.url=jdbc:sqlserver://localhost:9434;databaseName=test_ebean;sendTimeAsDateTime=false
|
||||
datasource.default=sqlserver2019
|
||||
ebean.sqlserver2019.databasePlatformName=sqlserver17
|
||||
|
||||
## A case sensitive collation example:
|
||||
#ebean.test.sqlserver.collation=LATIN1_GENERAL_100_CI_AS_SC_UTF8
|
||||
#ebean.sqlserver2019.caseSensitiveCollation=false
|
||||
+4
-4
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean composite</name>
|
||||
@@ -22,20 +22,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean composite</name>
|
||||
<description>Composite of common runtime dependencies</description>
|
||||
<artifactId>ebean</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>kotlin querybean generator</name>
|
||||
@@ -12,7 +12,7 @@
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
|
||||
<properties>
|
||||
<kotlin.version>1.5.30-M1</kotlin.version>
|
||||
<kotlin.version>1.6.0</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>kotlin querybean generator</name>
|
||||
<description>Generates Kotlin querybeans</description>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
|
||||
<properties>
|
||||
<kotlin.version>1.6.0</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- test dependencies -->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-datasource</artifactId>
|
||||
<version>${ebean-datasource.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-test</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
<version>2.0.1.Final</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-kapt</id>
|
||||
<goals>
|
||||
<goal>test-kapt</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirs>
|
||||
<sourceDir>src/test/kotlin</sourceDir>
|
||||
</sourceDirs>
|
||||
<annotationProcessorPaths>
|
||||
<annotationProcessorPath>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>12.8.2</version>
|
||||
</annotationProcessorPath>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirs>
|
||||
<source>src/main/java</source>
|
||||
<source>target/generated-sources/kapt/test</source>
|
||||
<source>target/generated-sources/kaptKotlin/test</source>
|
||||
</sourceDirs>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<jvmTarget>1.8</jvmTarget>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-testCompile</id>
|
||||
<phase>none</phase>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>java-test-compile</id>
|
||||
<phase>test-compile</phase>
|
||||
<goals>
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<!-- Turn off annotation processing for building -->
|
||||
<compilerArgument>-proc:none</compilerArgument>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-maven-plugin</artifactId>
|
||||
<version>${ebean-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test</id>
|
||||
<phase>process-test-classes</phase>
|
||||
<configuration>
|
||||
<transformArgs>debug=1</transformArgs>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>testEnhance</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ebean parent</name>
|
||||
@@ -108,9 +108,26 @@
|
||||
<module>ebean-querybean</module>
|
||||
<module>ebean-postgis</module>
|
||||
<module>ebean-redis</module>
|
||||
<!-- <module>tests</module>-->
|
||||
<!-- <module>ebean-kotlin</module>-->
|
||||
|
||||
</modules>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>default</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>ebean-kotlin</module>
|
||||
<module>tests</module>
|
||||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>foconis-release</id>
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
<?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>
|
||||
<groupId>org.avaje</groupId>
|
||||
<artifactId>java8-oss</artifactId>
|
||||
<version>3.2</version>
|
||||
</parent>
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ebean parent</name>
|
||||
<description>Parent for ebean modules</description>
|
||||
<url>https://ebean.io/</url>
|
||||
|
||||
<scm>
|
||||
<developerConnection>scm:git:git@github.com:ebean-orm/ebean.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>rbygrave</id>
|
||||
<name>Rob Bygrave</name>
|
||||
<email>robin.bygrave@gmail.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<nexus.staging.autoReleaseAfterClose>false</nexus.staging.autoReleaseAfterClose>
|
||||
<jackson.version>2.12.1</jackson.version>
|
||||
<ebean-ddl-runner.version>1.2</ebean-ddl-runner.version>
|
||||
<ebean-migration-auto.version>1.1</ebean-migration-auto.version>
|
||||
<ebean-migration.version>12.12.1</ebean-migration.version>
|
||||
<ebean-test-docker.version>4.2</ebean-test-docker.version>
|
||||
<ebean-datasource.version>7.3</ebean-datasource.version>
|
||||
<ebean-agent.version>12.13.0</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>12.13.0</ebean-maven-plugin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.2.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.199</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<modules>
|
||||
<module>ebean</module>
|
||||
<module>ebean-api</module>
|
||||
<module>ebean-bom</module>
|
||||
<module>ebean-core-type</module>
|
||||
<module>ebean-core</module>
|
||||
<module>ebean-ddl-generator</module>
|
||||
<module>ebean-autotune</module>
|
||||
<module>ebean-externalmapping-api</module>
|
||||
<module>ebean-externalmapping-xml</module>
|
||||
<module>ebean-test</module>
|
||||
<module>querybean-generator</module>
|
||||
<module>kotlin-querybean-generator</module>
|
||||
<module>ebean-querybean</module>
|
||||
<module>ebean-postgis</module>
|
||||
<module>ebean-redis</module>
|
||||
<!-- <module>ebean-kotlin</module>-->
|
||||
|
||||
</modules>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>default</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>ebean-kotlin</module>
|
||||
<module>tests</module>
|
||||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.13.1-FOC6-SNAPSHOT</version>
|
||||
<version>12.13.3-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>querybean generator</name>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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>12.13.2-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>querybean generator</name>
|
||||
<description>Querybean generator</description>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.2</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<!-- Turn off annotation processing for building -->
|
||||
<compilerArgument>-proc:none</compilerArgument>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.repaint.maven</groupId>
|
||||
<artifactId>tiles-maven-plugin</artifactId>
|
||||
<version>2.24</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.avaje.tile:moditech-module:1.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,83 @@
|
||||
#release configuration
|
||||
#Fri Dec 17 17:24:24 NZDT 2021
|
||||
projectVersionPolicyId=default
|
||||
project.scm.io.ebean\:ebean-core-type.tag=HEAD
|
||||
scm.branchCommitComment=@{prefix} prepare branch @{releaseLabel}
|
||||
project.rel.io.ebean\:ebean-ddl-generator=12.13.2
|
||||
project.dev.io.ebean\:ebean-core=12.13.3-SNAPSHOT
|
||||
project.scm.io.ebean\:ebean-api.tag=HEAD
|
||||
project.scm.io.ebean\:ebean-redis.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.scm.io.ebean\:ebean-querybean.tag=HEAD
|
||||
project.scm.io.ebean\:ebean-api.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.dev.io.ebean\:ebean-api=12.13.3-SNAPSHOT
|
||||
project.rel.io.ebean\:ebean=12.13.2
|
||||
project.dev.io.ebean\:ebean-core-type=12.13.3-SNAPSHOT
|
||||
project.scm.io.ebean\:ebean-ddl-generator.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
exec.activateProfiles=release
|
||||
project.dev.io.ebean\:ebean-test=12.13.3-SNAPSHOT
|
||||
project.scm.io.ebean\:kotlin-querybean-generator.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.scm.io.ebean\:ebean-querybean.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.scm.io.ebean\:ebean-bom.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.scm.io.ebean\:ebean-core.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.rel.io.ebean\:ebean-core-type=12.13.2
|
||||
project.rel.io.ebean\:kotlin-querybean-generator=12.13.2
|
||||
project.dev.io.ebean\:querybean-generator=12.13.3-SNAPSHOT
|
||||
project.scm.io.ebean\:ebean-autotune.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
scm.commentPrefix=[maven-release-plugin]
|
||||
releaseStrategyId=default
|
||||
project.rel.io.ebean\:ebean-querybean=12.13.2
|
||||
project.scm.io.ebean\:ebean-externalmapping-api.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.scm.io.ebean\:querybean-generator.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.dev.io.ebean\:kotlin-querybean-generator=12.13.3-SNAPSHOT
|
||||
project.scm.io.ebean\:ebean-core-type.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
completedPhase=generate-release-poms
|
||||
project.rel.io.ebean\:ebean-redis=12.13.2
|
||||
project.scm.io.ebean\:ebean-test.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.scm.io.ebean\:ebean-postgis.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.dev.io.ebean\:ebean-autotune=12.13.3-SNAPSHOT
|
||||
project.rel.io.ebean\:ebean-api=12.13.2
|
||||
project.scm.io.ebean\:ebean-postgis.tag=HEAD
|
||||
project.scm.io.ebean\:querybean-generator.tag=HEAD
|
||||
project.rel.io.ebean\:querybean-generator=12.13.2
|
||||
scm.tag=ebean-parent-12.13.2
|
||||
project.rel.io.ebean\:ebean-externalmapping-xml=12.13.2
|
||||
project.scm.io.ebean\:ebean-ddl-generator.tag=HEAD
|
||||
project.rel.io.ebean\:ebean-externalmapping-api=12.13.2
|
||||
project.scm.io.ebean\:ebean-externalmapping-xml.tag=HEAD
|
||||
preparationGoals=clean verify
|
||||
exec.pomFileName=pom.xml
|
||||
project.dev.io.ebean\:ebean-externalmapping-api=12.13.3-SNAPSHOT
|
||||
project.dev.io.ebean\:ebean=12.13.3-SNAPSHOT
|
||||
project.scm.io.ebean\:ebean.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.dev.io.ebean\:ebean-parent=12.13.3-SNAPSHOT
|
||||
project.dev.io.ebean\:ebean-externalmapping-xml=12.13.3-SNAPSHOT
|
||||
project.rel.io.ebean\:ebean-core=12.13.2
|
||||
project.dev.io.ebean\:ebean-redis=12.13.3-SNAPSHOT
|
||||
project.dev.io.ebean\:ebean-postgis=12.13.3-SNAPSHOT
|
||||
project.scm.io.ebean\:ebean-redis.tag=HEAD
|
||||
project.scm.io.ebean\:ebean-parent.tag=HEAD
|
||||
pushChanges=true
|
||||
project.scm.io.ebean\:ebean-externalmapping-xml.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
project.rel.io.ebean\:ebean-test=12.13.2
|
||||
project.scm.io.ebean\:kotlin-querybean-generator.tag=HEAD
|
||||
project.scm.io.ebean\:ebean-bom.tag=HEAD
|
||||
project.scm.io.ebean\:ebean-autotune.tag=HEAD
|
||||
project.scm.io.ebean\:ebean.tag=HEAD
|
||||
project.scm.io.ebean\:ebean-core.tag=HEAD
|
||||
project.rel.io.ebean\:ebean-autotune=12.13.2
|
||||
scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel}
|
||||
remoteTagging=true
|
||||
project.dev.io.ebean\:ebean-bom=12.13.3-SNAPSHOT
|
||||
project.dev.io.ebean\:ebean-querybean=12.13.3-SNAPSHOT
|
||||
project.rel.io.ebean\:ebean-bom=12.13.2
|
||||
project.scm.io.ebean\:ebean-parent.developerConnection=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
scm.url=scm\:git\:git@github.com\:ebean-orm/ebean.git
|
||||
scm.developmentCommitComment=@{prefix} prepare for next development iteration
|
||||
project.scm.io.ebean\:ebean-externalmapping-api.tag=HEAD
|
||||
scm.tagNameFormat=@{project.artifactId}-@{project.version}
|
||||
project.scm.io.ebean\:ebean-test.tag=HEAD
|
||||
project.dev.io.ebean\:ebean-ddl-generator=12.13.3-SNAPSHOT
|
||||
exec.snapshotReleasePluginAllowed=false
|
||||
scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel}
|
||||
project.rel.io.ebean\:ebean-postgis=12.13.2
|
||||
project.rel.io.ebean\:ebean-parent=12.13.2
|
||||
+21
-6
@@ -5,6 +5,7 @@
|
||||
<groupId>org.avaje</groupId>
|
||||
<artifactId>java8-oss</artifactId>
|
||||
<version>2.3</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
@@ -19,11 +20,25 @@
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
<!-- test-java16 REQUIRES JDK 16 to run -->
|
||||
<!-- <module>test-java16</module>-->
|
||||
<!-- test-kotlin does NOT run with JDK 16!! -->
|
||||
<module>test-kotlin</module>
|
||||
</modules>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>jdk16plus</id>
|
||||
<activation>
|
||||
<jdk>[16,20]</jdk>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>test-java16</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>jdk15less</id>
|
||||
<activation>
|
||||
<jdk>[8,15]</jdk>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>test-kotlin</module>
|
||||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -32,7 +32,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<path>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
<groupId>org.avaje</groupId>
|
||||
<artifactId>java11-oss</artifactId>
|
||||
<version>2.3</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<name>kotlin test</name>
|
||||
<name>test-kotlin</name>
|
||||
<description>Kotlin specific tests</description>
|
||||
<artifactId>test-kotlin</artifactId>
|
||||
<version>1.0</version>
|
||||
@@ -19,7 +20,7 @@
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
|
||||
<ebean-maven-plugin.version>12.13.0</ebean-maven-plugin.version>
|
||||
<kotlin.version>1.5.31</kotlin.version>
|
||||
<kotlin.version>1.6.0</kotlin.version>
|
||||
<jackson.version>2.12.1</jackson.version>
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
</properties>
|
||||
@@ -35,14 +36,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<version>12.13.2-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user