No effective change - OrmQueryDetail - remove unnecessary if, simplify if

This commit is contained in:
Robin Bygrave
2015-08-01 09:01:43 +12:00
parent 4f2d669897
commit 1897ac67a0
2 changed files with 4 additions and 7 deletions
@@ -297,9 +297,8 @@ public class OrmQueryDetail implements Serializable {
BeanPropertyAssoc<?> assocOne = (BeanPropertyAssoc<?>) el.getBeanProperty();
parentProp = new OrmQueryProperties(parentPath, assocOne.getTargetIdProperty());
}
if (parentProp != null) {
sortFetchPaths(d, parentProp, sorted);
}
sortFetchPaths(d, parentProp, sorted);
sorted.put(path, p);
}
}
@@ -366,10 +365,8 @@ public class OrmQueryDetail implements Serializable {
} else {
if (lazyLoadManyPath != null && lazyLoadManyPath.equals(parent.getPath())) {
return false;
} else if (!parent.isFetchJoin()) {
return true;
} else {
return hasParentSecJoin(lazyLoadManyPath, parent);
return !parent.isFetchJoin() || hasParentSecJoin(lazyLoadManyPath, parent);
}
}
}
@@ -155,7 +155,7 @@ public class OrmQueryDetailParser {
String props = null;
String path = parser.nextWord();
String token = null;
String token;
while ((token = parser.nextWord()) != null) {
if (!readAlias && parser.isMatch("as")) {
// next token is alias