#1460 - ENH: Add FetchGroup ... as a mechanism to specify select() + fetch() separately from Query

This commit is contained in:
rob bygrave committed 2018-07-30 23:51:52 +12:00
1 parent 02fe956056
commit 471605619a
17 files changed
+569 -7

No files matched your search

@@ -55,6 +55,16 @@ public class OrmQueryDetail implements Serializable {
return copy;
}
/**
* Add a nested OrmQueryDetail to this detail.
*/
public void addNested(String path, OrmQueryDetail other, FetchConfig config) {
fetch(path, other.baseProps.getProperties(), config);
for (Map.Entry<String, OrmQueryProperties> entry : other.fetchPaths.entrySet()) {
fetch(path + "." + entry.getKey(), entry.getValue().getProperties(), entry.getValue().getFetchConfig());
}
}
/**
* Calculate the hash for the query plan.
*/