mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#566 - Refactor internals - SpiExpression, add prepareExpression() to merge queryAutoTuneHash() and queryPlanHash() - tidy up OrmQueryRequest
This commit is contained in:
1 parent
af554410fd
commit
69bf1758bc
6 files changed
+47
-73
No files matched your search
@@ -378,12 +378,14 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
/**
|
||||
* Return true if the where expressions contains a many property.
|
||||
*/
|
||||
public boolean initManyWhereJoins() {
|
||||
private void initManyWhereJoins() {
|
||||
manyWhereJoins = new ManyWhereJoins();
|
||||
if (whereExpressions != null) {
|
||||
whereExpressions.containsMany(beanDescriptor, manyWhereJoins);
|
||||
}
|
||||
return !manyWhereJoins.isEmpty();
|
||||
if (!manyWhereJoins.isEmpty()) {
|
||||
setSqlDistinct(true);
|
||||
}
|
||||
}
|
||||
|
||||
public ManyWhereJoins getManyWhereJoins() {
|
||||
@@ -440,8 +442,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
this.lazyLoadManyPath = lazyLoadManyPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllowOneManyFetch() {
|
||||
private boolean isAllowOneManyFetch() {
|
||||
|
||||
if (Mode.LAZYLOAD_MANY.equals(getMode())) {
|
||||
return false;
|
||||
@@ -453,10 +454,16 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void convertJoins(int queryBatchSize) {
|
||||
initManyWhereJoins();
|
||||
convertManyFetchJoinsToQueryJoins(queryBatchSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert any many joins fetch joins to query joins.
|
||||
*/
|
||||
public void convertManyFetchJoinsToQueryJoins(int queryBatch) {
|
||||
private void convertManyFetchJoinsToQueryJoins(int queryBatch) {
|
||||
boolean allowOne = isAllowOneManyFetch();
|
||||
detail.convertManyFetchJoinsToQueryJoins(beanDescriptor, lazyLoadManyPath, allowOne, queryBatch);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user