#566 - Refactor internals - SpiExpression, add prepareExpression() to merge queryAutoTuneHash() and queryPlanHash() - tidy up createQueryRequest

This commit is contained in:
Robin Bygrave
2016-02-16 08:57:12 +13:00
parent 1aeffd31e0
commit 4df2d4020e
6 changed files with 34 additions and 56 deletions
@@ -440,6 +440,19 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
this.lazyLoadManyPath = lazyLoadManyPath;
}
@Override
public boolean isAllowOneManyFetch() {
if (Mode.LAZYLOAD_MANY.equals(getMode())) {
return false;
} else if (hasMaxRowsOrFirstRow() && !isRawSql() && !isSqlSelect()) {
return false;
}
return true;
}
/**
* Convert any many joins fetch joins to query joins.
*/