mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
No effective change - rename SpiQuery method for m2mIncludeJoin and simplify OrmQueryPlanKey to associated intersection table name
This commit is contained in:
1 parent
74c6c71301
commit
4d1340c16c
5 files changed
+21
-16
No files matched your search
@@ -55,7 +55,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
* For lazy loading of ManyToMany we need to add a join to the intersection table. This is that
|
||||
* join to the intersection table.
|
||||
*/
|
||||
private TableJoin includeTableJoin;
|
||||
private TableJoin m2mIncludeJoin;
|
||||
|
||||
private ProfilingListener profilingListener;
|
||||
|
||||
@@ -571,7 +571,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
public DefaultOrmQuery<T> copy(EbeanServer server) {
|
||||
|
||||
DefaultOrmQuery<T> copy = new DefaultOrmQuery<T>(beanDescriptor, server, expressionFactory);
|
||||
copy.includeTableJoin = includeTableJoin;
|
||||
copy.m2mIncludeJoin = m2mIncludeJoin;
|
||||
copy.profilingListener = profilingListener;
|
||||
|
||||
// copy.query = query;
|
||||
@@ -846,7 +846,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
*/
|
||||
CQueryPlanKey createQueryPlanKey() {
|
||||
|
||||
queryPlanKey = new OrmQueryPlanKey(includeTableJoin, type, detail, maxRows, firstRow,
|
||||
queryPlanKey = new OrmQueryPlanKey(m2mIncludeJoin, type, detail, maxRows, firstRow,
|
||||
disableLazyLoading, orderBy,
|
||||
distinct, sqlDistinct, mapKey, id, bindParams, whereExpressions, havingExpressions,
|
||||
temporalMode, forUpdate, rootTableAlias, rawSql, updateProperties);
|
||||
@@ -1264,14 +1264,13 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
return "Query [" + whereExpressions + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableJoin getIncludeTableJoin() {
|
||||
return includeTableJoin;
|
||||
public TableJoin getM2mIncludeJoin() {
|
||||
return m2mIncludeJoin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIncludeTableJoin(TableJoin includeTableJoin) {
|
||||
this.includeTableJoin = includeTableJoin;
|
||||
public void setM2MIncludeJoin(TableJoin m2mIncludeJoin) {
|
||||
this.m2mIncludeJoin = m2mIncludeJoin;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.avaje.ebeaninternal.server.deploy.TableJoin;
|
||||
*/
|
||||
public class OrmQueryPlanKey implements CQueryPlanKey {
|
||||
|
||||
private final TableJoin includeTableJoin;
|
||||
private final String m2mIncludeTable;
|
||||
private final String orderByAsSting;
|
||||
private final OrmQueryDetail detail;
|
||||
private final SpiExpression where;
|
||||
@@ -38,7 +38,7 @@ public class OrmQueryPlanKey implements CQueryPlanKey {
|
||||
|
||||
public OrmQueryPlanKey(TableJoin includeTableJoin, SpiQuery.Type type, OrmQueryDetail detail, int maxRows, int firstRow, boolean disableLazyLoading, OrderBy<?> orderBy, boolean distinct, boolean sqlDistinct, String mapKey, Object id, BindParams bindParams, SpiExpression whereExpressions, SpiExpression havingExpressions, SpiQuery.TemporalMode temporalMode, boolean forUpdate, String rootTableAlias, RawSql rawSql, OrmUpdateProperties updateProperties) {
|
||||
|
||||
this.includeTableJoin = includeTableJoin;
|
||||
this.m2mIncludeTable = includeTableJoin == null ? null : includeTableJoin.getTable();
|
||||
this.type = type;
|
||||
this.detail = detail;
|
||||
this.maxRows = maxRows;
|
||||
@@ -69,7 +69,7 @@ public class OrmQueryPlanKey implements CQueryPlanKey {
|
||||
builder.add(hasIdValue);
|
||||
builder.add(temporalMode);
|
||||
builder.add(rawSqlKey == null ? 0 : rawSqlKey.hashCode());
|
||||
builder.add(includeTableJoin != null ? includeTableJoin.queryHash() : 0);
|
||||
builder.add(m2mIncludeTable);
|
||||
builder.add(rootTableAlias);
|
||||
|
||||
if (detail != null) {
|
||||
@@ -120,7 +120,7 @@ public class OrmQueryPlanKey implements CQueryPlanKey {
|
||||
if (hasIdValue != that.hasIdValue) return false;
|
||||
if (type != that.type) return false;
|
||||
if (temporalMode != that.temporalMode) return false;
|
||||
if (includeTableJoin != null ? !includeTableJoin.equals(that.includeTableJoin) : that.includeTableJoin != null) return false;
|
||||
if (m2mIncludeTable != null ? !m2mIncludeTable.equals(that.m2mIncludeTable) : that.m2mIncludeTable != null) return false;
|
||||
if (orderByAsSting != null ? !orderByAsSting.equals(that.orderByAsSting) : that.orderByAsSting != null) return false;
|
||||
if (where != null ? !where.isSameByPlan(that.where) : that.where != null) return false;
|
||||
if (having != null ? !having.isSameByPlan(that.having) : that.having != null) return false;
|
||||
|
||||
Reference in new issue
Block a user