diff --git a/src/main/java/com/avaje/ebeaninternal/server/querydefn/OrmQueryPlanKey.java b/src/main/java/com/avaje/ebeaninternal/server/querydefn/OrmQueryPlanKey.java index 11b1c6616..60b15fe5d 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/querydefn/OrmQueryPlanKey.java +++ b/src/main/java/com/avaje/ebeaninternal/server/querydefn/OrmQueryPlanKey.java @@ -16,7 +16,6 @@ public class OrmQueryPlanKey implements CQueryPlanKey { private final String m2mIncludeTable; private final String orderByAsSting; - private final OrmQueryDetail detail; private final SpiExpression where; private final SpiExpression having; private final RawSql.Key rawSqlKey; @@ -36,11 +35,10 @@ public class OrmQueryPlanKey implements CQueryPlanKey { private final int planHash; private final int bindCount; - 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) { + public OrmQueryPlanKey(TableJoin m2mIncludeTable, 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.m2mIncludeTable = includeTableJoin == null ? null : includeTableJoin.getTable(); + this.m2mIncludeTable = m2mIncludeTable == null ? null : m2mIncludeTable.getTable(); this.type = type; - this.detail = detail; this.maxRows = maxRows; this.firstRow = firstRow; this.disableLazyLoading = disableLazyLoading; @@ -69,7 +67,7 @@ public class OrmQueryPlanKey implements CQueryPlanKey { builder.add(hasIdValue); builder.add(temporalMode); builder.add(rawSqlKey == null ? 0 : rawSqlKey.hashCode()); - builder.add(m2mIncludeTable); + builder.add(this.m2mIncludeTable); builder.add(rootTableAlias); if (detail != null) { @@ -126,9 +124,6 @@ public class OrmQueryPlanKey implements CQueryPlanKey { if (having != null ? !having.isSameByPlan(that.having) : that.having != null) return false; if (updateProperties != null ? !updateProperties.isSameByPlan(that.updateProperties) : that.updateProperties != null) return false; if (rawSqlKey != null ? !rawSqlKey.equals(that.rawSqlKey) : that.rawSqlKey != null) return false; - -// if (detail != null ? !detail.equals(that.detail) : that.detail != null) return false; - if (mapKey != null ? !mapKey.equals(that.mapKey) : that.mapKey != null) return false; return rootTableAlias != null ? rootTableAlias.equals(that.rootTableAlias) : that.rootTableAlias == null; }