mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 14:46:25 +00:00
#1021 Fix for query plan clash with single inheritance and cached query
This commit is contained in:
1 parent
2a64a02211
commit
8cef603d1c
3 files changed
+85
-72
No files matched your search
@@ -961,7 +961,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
if (isNativeSql()) {
|
||||
queryPlanKey = new NativeSqlQueryPlanKey(nativeSql);
|
||||
} else {
|
||||
queryPlanKey = new OrmQueryPlanKey(m2mIncludeJoin, type, detail, maxRows, firstRow,
|
||||
queryPlanKey = new OrmQueryPlanKey(beanDescriptor.getDiscValue(), m2mIncludeJoin, type, detail, maxRows, firstRow,
|
||||
disableLazyLoading, orderBy,
|
||||
distinct, sqlDistinct, mapKey, id, bindParams, whereExpressions, havingExpressions,
|
||||
temporalMode, forUpdate, rootTableAlias, rawSql, updateProperties);
|
||||
|
||||
@@ -26,7 +26,7 @@ class OrmQueryPlanKey implements CQueryPlanKey {
|
||||
private final int bindCount;
|
||||
private final String options;
|
||||
|
||||
OrmQueryPlanKey(TableJoin m2mIncludeTable, SpiQuery.Type type, OrmQueryDetail detail, int maxRows, int firstRow, boolean disableLazyLoading,
|
||||
OrmQueryPlanKey(String discValue, 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,
|
||||
Query.ForUpdate forUpdate, String rootTableAlias, RawSql rawSql, OrmUpdateProperties updateProperties) {
|
||||
@@ -35,6 +35,9 @@ class OrmQueryPlanKey implements CQueryPlanKey {
|
||||
if (type != null) {
|
||||
sb.append("t:").append(type.ordinal());
|
||||
}
|
||||
if (discValue != null) {
|
||||
sb.append("disc:").append(discValue);
|
||||
}
|
||||
if (temporalMode != SpiQuery.TemporalMode.CURRENT) {
|
||||
sb.append(",temp:").append(temporalMode.ordinal());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user