mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#566 - Refactor internals - Initial tidy on OrmQueryDetail and OrmQueryDetailProperties - internals for fetch paths etc
This commit is contained in:
1 parent
2fcaab44c6
commit
5c6d6608ef
12 files changed
+397
-145
No files matched your search
@@ -353,7 +353,7 @@ public class CQueryBuilder {
|
||||
|
||||
// transfer PathProperties into OrmQueryDetail
|
||||
for (String path : pathProps.getPaths()) {
|
||||
detail.getChunk(path, true).setDefaultProperties(null, pathProps.get(path));
|
||||
detail.fetch(path, pathProps.get(path));
|
||||
}
|
||||
|
||||
// check if @Id property included in RawSql
|
||||
|
||||
@@ -140,7 +140,7 @@ public class SqlTreeBuilder {
|
||||
boolean includeJoins = (alias == null) ? false : alias.isIncludeJoins();
|
||||
|
||||
return new SqlTree(summary.toString(), rootNode, selectSql, fromSql, inheritanceWhereSql, encryptedProps,
|
||||
manyProperty, queryDetail.getIncludes(), includeJoins);
|
||||
manyProperty, queryDetail.getFetchPaths(), includeJoins);
|
||||
}
|
||||
|
||||
private String buildSelectClause() {
|
||||
@@ -183,7 +183,7 @@ public class SqlTreeBuilder {
|
||||
rootNode = buildSelectChain(null, null, desc, null);
|
||||
|
||||
if (!rawSql) {
|
||||
alias.addJoin(queryDetail.getIncludes(), desc);
|
||||
alias.addJoin(queryDetail.getFetchPaths(), desc);
|
||||
alias.addJoin(predicates.getPredicateIncludes(), desc);
|
||||
alias.addManyWhereJoins(manyWhereJoins.getPropertyNames());
|
||||
|
||||
@@ -471,7 +471,7 @@ public class SqlTreeBuilder {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (queryDetail.includes(propName)) {
|
||||
if (queryDetail.includesPath(propName)) {
|
||||
|
||||
if (manyProperty != null) {
|
||||
// only one many associated allowed to be included in fetch
|
||||
@@ -498,7 +498,7 @@ public class SqlTreeBuilder {
|
||||
*/
|
||||
private boolean isIncludeBean(String prefix) {
|
||||
|
||||
if (queryDetail.includes(prefix)) {
|
||||
if (queryDetail.includesPath(prefix)) {
|
||||
// explicitly included
|
||||
summary.append(", ").append(prefix);
|
||||
String[] splitNames = SplitName.split(prefix);
|
||||
|
||||
Reference in new issue
Block a user