mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e51d9ba2ab | ||
|
|
1b1dce90ed | ||
|
|
405834fa45 | ||
|
|
7720229af9 | ||
|
|
89a294414e | ||
|
|
7bbfc00b86 | ||
|
|
d6c76de0a2 | ||
|
|
36f3986689 | ||
|
|
f0f4f13ec6 | ||
|
|
08466d42e9 | ||
|
|
1f841982a5 | ||
|
|
b34704a1fa |
@@ -86,7 +86,7 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:14.1.0</tile>
|
||||
<tile>io.ebean.tile:enhancement:14.2.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:14.1.0</tile>
|
||||
<tile>io.ebean.tile:enhancement:14.2.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
+8
-8
@@ -57,7 +57,7 @@ import java.util.stream.Stream;
|
||||
* @param <R> the specific root query bean type (e.g. QCustomer)
|
||||
*/
|
||||
@NonNullApi
|
||||
public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
|
||||
public abstract class QueryBean<T, R> implements IQueryBean<T, R> {
|
||||
|
||||
/**
|
||||
* The underlying query.
|
||||
@@ -88,21 +88,21 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
|
||||
/**
|
||||
* Construct using the type of bean to query on and the default database.
|
||||
*/
|
||||
public TQRootBean(Class<T> beanType) {
|
||||
public QueryBean(Class<T> beanType) {
|
||||
this(beanType, DB.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct using the type of bean to query on and a given database.
|
||||
*/
|
||||
public TQRootBean(Class<T> beanType, Database database) {
|
||||
public QueryBean(Class<T> beanType, Database database) {
|
||||
this(database.find(beanType));
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct with a transaction.
|
||||
*/
|
||||
protected TQRootBean(Class<T> beanType, Transaction transaction) {
|
||||
protected QueryBean(Class<T> beanType, Transaction transaction) {
|
||||
this(beanType);
|
||||
query.usingTransaction(transaction);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
|
||||
/**
|
||||
* Construct with a database and transaction.
|
||||
*/
|
||||
protected TQRootBean(Class<T> beanType, Database database, Transaction transaction) {
|
||||
protected QueryBean(Class<T> beanType, Database database, Transaction transaction) {
|
||||
this(beanType, database);
|
||||
query.usingTransaction(transaction);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
|
||||
* Construct using a query.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public TQRootBean(Query<T> query) {
|
||||
public QueryBean(Query<T> query) {
|
||||
this.query = query;
|
||||
this.root = (R) this;
|
||||
}
|
||||
@@ -129,13 +129,13 @@ public abstract class TQRootBean<T, R> implements IQueryBean<T, R> {
|
||||
* values for select() and fetch().
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public TQRootBean(boolean aliasDummy) {
|
||||
public QueryBean(boolean aliasDummy) {
|
||||
this.query = null;
|
||||
this.root = (R) this;
|
||||
}
|
||||
|
||||
/** Construct for FilterMany */
|
||||
protected TQRootBean(ExpressionList<T> filter) {
|
||||
protected QueryBean(ExpressionList<T> filter) {
|
||||
this.query = null;
|
||||
this.root = null;
|
||||
this.whereStack = new ArrayStack<>();
|
||||
@@ -46,7 +46,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
* Eagerly fetch this association fetching all the properties.
|
||||
*/
|
||||
public final R fetch() {
|
||||
((TQRootBean) _root).query().fetch(_name);
|
||||
((QueryBean) _root).query().fetch(_name);
|
||||
return _root;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
* Eagerly fetch this association using a "query join".
|
||||
*/
|
||||
public final R fetchQuery() {
|
||||
((TQRootBean) _root).query().fetchQuery(_name);
|
||||
((QueryBean) _root).query().fetchQuery(_name);
|
||||
return _root;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
* Cache misses are populated via fetchQuery().
|
||||
*/
|
||||
public final R fetchCache() {
|
||||
((TQRootBean) _root).query().fetchCache(_name);
|
||||
((QueryBean) _root).query().fetchCache(_name);
|
||||
return _root;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
* Use lazy loading for fetching this association.
|
||||
*/
|
||||
public final R fetchLazy() {
|
||||
((TQRootBean) _root).query().fetchLazy(_name);
|
||||
((QueryBean) _root).query().fetchLazy(_name);
|
||||
return _root;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
* Eagerly fetch this association with the properties specified.
|
||||
*/
|
||||
public final R fetch(String properties) {
|
||||
((TQRootBean) _root).query().fetch(_name, properties);
|
||||
((QueryBean) _root).query().fetch(_name, properties);
|
||||
return _root;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
* Eagerly fetch this association using a "query join" with the properties specified.
|
||||
*/
|
||||
public final R fetchQuery(String properties) {
|
||||
((TQRootBean) _root).query().fetchQuery(_name, properties);
|
||||
((QueryBean) _root).query().fetchQuery(_name, properties);
|
||||
return _root;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
* Cache misses are populated via fetchQuery().
|
||||
*/
|
||||
public final R fetchCache(String properties) {
|
||||
((TQRootBean) _root).query().fetchCache(_name, properties);
|
||||
((QueryBean) _root).query().fetchCache(_name, properties);
|
||||
return _root;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ public abstract class TQAssocBean<T, R, QB> extends TQAssoc<T, R> {
|
||||
}
|
||||
|
||||
private SpiQueryFetch spiQuery() {
|
||||
return (SpiQueryFetch) ((TQRootBean) _root).query();
|
||||
return (SpiQueryFetch) ((QueryBean) _root).query();
|
||||
}
|
||||
|
||||
private Set<String> properties(TQProperty<?, ?>... props) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TQProperty<R, T> implements Query.Property<T> {
|
||||
* Internal method to return the underlying expression list.
|
||||
*/
|
||||
protected final ExpressionList<?> expr() {
|
||||
return ((TQRootBean<?, ?>) _root).peekExprList();
|
||||
return ((QueryBean<?, ?>) _root).peekExprList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:14.1.0</tile>
|
||||
<tile>io.ebean.tile:enhancement:14.2.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:14.1.0</tile>
|
||||
<tile>io.ebean.tile:enhancement:14.2.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@
|
||||
<artifactId>ebean-test</artifactId>
|
||||
|
||||
<properties>
|
||||
<bytebuddy.version>1.14.12</bytebuddy.version>
|
||||
<bytebuddy.version>1.14.13</bytebuddy.version>
|
||||
<assertj.version>3.25.3</assertj.version>
|
||||
</properties>
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:14.1.0</tile>
|
||||
<tile>io.ebean.tile:enhancement:14.2.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -18,6 +18,7 @@ class TestLazyLoadMany extends BaseTestCase {
|
||||
}
|
||||
return m0;
|
||||
}
|
||||
|
||||
@Test
|
||||
void loadAfterPCCleared() {
|
||||
|
||||
@@ -31,6 +32,7 @@ class TestLazyLoadMany extends BaseTestCase {
|
||||
List<COOne> children = DB.find(COOne.class)
|
||||
.setLazyLoadBatchSize(2)
|
||||
.where().startsWith("name", "tll-m")
|
||||
.orderBy("name")
|
||||
.findList();
|
||||
|
||||
assertThat(children).hasSize(3);
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ class SimpleQueryBeanWriter {
|
||||
writer.append(" */").eol();
|
||||
writer.append(Constants.AT_GENERATED).eol();
|
||||
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
|
||||
writer.append("class Q%s : io.ebean.typequery.TQRootBean<%s, Q%s> {", shortName, beanFullName, shortName).eol();
|
||||
writer.append("class Q%s : io.ebean.typequery.QueryBean<%s, Q%s> {", shortName, beanFullName, shortName).eol();
|
||||
}
|
||||
|
||||
writer.eol();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.avaje</groupId>
|
||||
<artifactId>java11-oss</artifactId>
|
||||
<version>3.12</version>
|
||||
<version>4.1</version>
|
||||
</parent>
|
||||
|
||||
<groupId>io.ebean</groupId>
|
||||
@@ -51,10 +51,10 @@
|
||||
<ebean-ddl-runner.version>2.3</ebean-ddl-runner.version>
|
||||
<ebean-migration-auto.version>1.2</ebean-migration-auto.version>
|
||||
<ebean-migration.version>14.0.0</ebean-migration.version>
|
||||
<ebean-test-containers.version>7.3</ebean-test-containers.version>
|
||||
<ebean-datasource.version>8.12</ebean-datasource.version>
|
||||
<ebean-agent.version>14.1.0</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>14.1.0</ebean-maven-plugin.version>
|
||||
<ebean-test-containers.version>7.4</ebean-test-containers.version>
|
||||
<ebean-datasource.version>8.14</ebean-datasource.version>
|
||||
<ebean-agent.version>14.2.1</ebean-agent.version>
|
||||
<ebean-maven-plugin.version>14.2.1</ebean-maven-plugin.version>
|
||||
<surefire.useModulePath>false</surefire.useModulePath>
|
||||
</properties>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
+1
-1
@@ -225,7 +225,7 @@ class SimpleQueryBeanWriter {
|
||||
writer.append("public final class Q%s {", shortName).eol();
|
||||
} else {
|
||||
writer.append(Constants.AT_TYPEQUERYBEAN).eol();
|
||||
writer.append("public final class Q%s extends io.ebean.typequery.TQRootBean<%s,Q%s> {", shortName, beanFullName, shortName).eol();
|
||||
writer.append("public final class Q%s extends io.ebean.typequery.QueryBean<%s,Q%s> {", shortName, beanFullName, shortName).eol();
|
||||
}
|
||||
writer.eol();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<artifactId>test-java16</artifactId>
|
||||
|
||||
<properties>
|
||||
<java.release>16</java.release>
|
||||
<maven.compiler.release>17</maven.compiler.release>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -52,7 +52,7 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<tiles>
|
||||
<tile>io.ebean.tile:enhancement:14.1.0</tile>
|
||||
<tile>io.ebean.tile:enhancement:14.2.0</tile>
|
||||
</tiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<dependency>
|
||||
<groupId>io.avaje</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.4</version>
|
||||
<version>1.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
<groupId>io.ebean</groupId>
|
||||
<artifactId>kotlin-querybean-generator</artifactId>
|
||||
<!-- <artifactId>querybean-generator</artifactId>-->
|
||||
<version>14.0.2</version>
|
||||
<version>14.1.0</version>
|
||||
</annotationProcessorPath>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user