mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Merge remote-tracking branch 'ebean/master' into ebean-new
# Conflicts: # ebean-api/pom.xml # ebean-autotune/pom.xml # ebean-bom/pom.xml # ebean-core-type/pom.xml # ebean-core/pom.xml # 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/pom.xml # kotlin-querybean-generator/pom.xml # pom.xml # querybean-generator/pom.xml
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
|
||||
name: Build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java_version: [8]
|
||||
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: Build with Maven
|
||||
run: mvn package
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[](https://travis-ci.org/ebean-orm/ebean)
|
||||
[](https://github.com/ebean-orm/ebean/actions/workflows/build.yml)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/io.ebean/ebean)
|
||||
|
||||
# Sponsors
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean api</name>
|
||||
@@ -49,7 +49,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-annotation</artifactId>
|
||||
<version>7.4-SNAPSHOT</version>
|
||||
<version>7.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
@@ -26,7 +26,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+15
-15
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean bom</name>
|
||||
@@ -71,88 +71,88 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-xml</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-autotune</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-postgis</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
@@ -16,7 +16,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-core</artifactId>
|
||||
@@ -41,19 +41,19 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
+17
-4
@@ -275,12 +275,18 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void put(Object id, Object b) {
|
||||
private void put(Object id, Object bean) {
|
||||
Object existing;
|
||||
if (useReferences) {
|
||||
weakCount++;
|
||||
map.put(id, new BeanRef(this, id, b, queue));
|
||||
existing = map.put(id, new BeanRef(this, id, bean, queue));
|
||||
} else {
|
||||
map.put(id, b);
|
||||
existing = map.put(id, bean);
|
||||
}
|
||||
if (existing instanceof BeanRef) {
|
||||
// when a BeanRef is replaced, its expunge() must NOT remove an entry
|
||||
((BeanRef) existing).setReplaced();
|
||||
weakCount--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,6 +336,7 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
||||
|
||||
private final ClassContext classContext;
|
||||
private final Object key;
|
||||
private boolean replaced;
|
||||
|
||||
private BeanRef(ClassContext classContext, Object key, Object referent, ReferenceQueue<? super Object> q) {
|
||||
super(referent, q);
|
||||
@@ -337,8 +344,14 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
private void setReplaced() {
|
||||
replaced = true;
|
||||
}
|
||||
|
||||
private void expunge() {
|
||||
classContext.remove(key);
|
||||
if (!replaced) {
|
||||
classContext.remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean ddl generation</name>
|
||||
@@ -28,14 +28,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core-type</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean external mapping api</name>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!-- <parent>-->
|
||||
<!-- <groupId>org.avaje</groupId>-->
|
||||
@@ -33,7 +33,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-externalmapping-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -59,14 +59,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean postgis</name>
|
||||
@@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean querybean</name>
|
||||
@@ -17,7 +17,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -56,21 +56,21 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+6
-6
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ebean-redis</artifactId>
|
||||
@@ -22,35 +22,35 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean test</name>
|
||||
@@ -29,14 +29,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class TestPersistenceContext extends BaseTestCase {
|
||||
|
||||
|
||||
@Test
|
||||
void testReload() {
|
||||
ResetBasicData.reset();
|
||||
@@ -34,7 +33,7 @@ class TestPersistenceContext extends BaseTestCase {
|
||||
assertThat(notes.get(0).getTitle()).isEqualTo("FooBar");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void test() {
|
||||
ResetBasicData.reset();
|
||||
@@ -191,4 +190,30 @@ class TestPersistenceContext extends BaseTestCase {
|
||||
assertThat(pc.toString()).contains("Customer=size:200 (0 weak)");
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled // run manually
|
||||
@Test
|
||||
void testPcScopes_with_findEachFindList() {
|
||||
for (int i = 0; i < 5000; i++) {
|
||||
Customer c = new Customer();
|
||||
c.setName("Customer #" + i);
|
||||
DB.save(c);
|
||||
Order o = new Order();
|
||||
o.setCustomer(c);
|
||||
DB.save(o);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
try (Transaction txn = DB.beginTransaction()) {
|
||||
List<Customer> customers = new ArrayList<>();
|
||||
DB.find(Customer.class).select("id").findEach(customers::add);
|
||||
SpiPersistenceContext pc = ((SpiTransaction) txn).getPersistenceContext();
|
||||
assertThat(pc.toString()).contains("Customer=size:5000 (5000 weak)");
|
||||
customers.clear();
|
||||
customers = DB.find(Customer.class).select("id").findList();
|
||||
|
||||
assertThat(pc.toString()).contains("Customer=size:5000"); // We expect ALWAYS 5000 entries in the PC
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,16 +10,16 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class TestExtraScalarTypes extends BaseTestCase {
|
||||
class TestExtraScalarTypes extends BaseTestCase {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
void test() {
|
||||
|
||||
Locale locale = Locale.getDefault();
|
||||
Currency currency = Currency.getInstance(locale);
|
||||
Locale locale = Locale.ENGLISH;
|
||||
Currency currency = Currency.getInstance(Locale.US);
|
||||
TimeZone tz = TimeZone.getDefault();
|
||||
|
||||
ESomeType e = new ESomeType();
|
||||
@@ -29,20 +29,20 @@ public class TestExtraScalarTypes extends BaseTestCase {
|
||||
|
||||
DB.save(e);
|
||||
|
||||
ESomeType e2 = DB.find(ESomeType.class).setAutoTune(false).setId(e.getId()).findOne();
|
||||
ESomeType e2 = DB.find(ESomeType.class).setId(e.getId()).findOne();
|
||||
|
||||
assertNotNull(e2.getCurrency());
|
||||
assertNotNull(e2.getLocale());
|
||||
assertNotNull(e2.getTimeZone());
|
||||
|
||||
List<ESomeType> list = DB.find(ESomeType.class)
|
||||
.setAutoTune(false).where()
|
||||
.where()
|
||||
.eq("locale", locale)
|
||||
.eq("timeZone", tz.getID())
|
||||
.eq("currency", currency)
|
||||
.findList();
|
||||
|
||||
assertTrue(!list.isEmpty());
|
||||
assertThat(list).isNotEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-4
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>ebean composite</name>
|
||||
@@ -22,20 +22,20 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-api</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Technically optional but most expected to use query beans -->
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>kotlin querybean generator</name>
|
||||
@@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-querybean</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-ddl-generator</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-FOC1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>ebean parent</name>
|
||||
@@ -45,8 +45,8 @@
|
||||
<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.12.3-FOC1-SNAPSHOT</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>12.12.3-FOC1-SNAPSHOT</ebean-maven-plugin.version>
|
||||
<ebean-agent.version>12.13.0-FOC1-SNAPSHOT</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>12.13.0-FOC1-SNAPSHOT</ebean-maven-plugin.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>ebean-parent</artifactId>
|
||||
<groupId>io.ebean</groupId>
|
||||
<version>12.12.4-FOC1-SNAPSHOT</version>
|
||||
<version>12.13.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>querybean generator</name>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean</artifactId>
|
||||
<version>12.12.3-SNAPSHOT</version>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -32,7 +32,7 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.12.3-SNAPSHOT</version>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<path>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>querybean-generator</artifactId>
|
||||
<version>12.12.3-SNAPSHOT</version>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
|
||||
<ebean-maven-plugin.version>12.12.1</ebean-maven-plugin.version>
|
||||
<ebean-maven-plugin.version>12.13.0</ebean-maven-plugin.version>
|
||||
<kotlin.version>1.5.31</kotlin.version>
|
||||
<jackson.version>2.12.1</jackson.version>
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
@@ -35,14 +35,14 @@
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-test</artifactId>
|
||||
<version>12.12.3-SNAPSHOT</version>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>ebean-core</artifactId>
|
||||
<version>12.12.3-SNAPSHOT</version>
|
||||
<version>12.13.0-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user