#1181 - ENH: Add @FetchPreference support - Secondary query generation is based on order of fetch statements

This commit is contained in:
Rob Bygrave committed 2017-11-08 23:19:58 +13:00
1 parent 9b2b2f7787
commit 156f505394
11 files changed
+123 -11

No files matched your search

@@ -84,6 +84,11 @@ public class ElPropertyChain implements ElPropertyValue {
return "expr:" + expression + " chain:" + Arrays.toString(chain);
}
@Override
public int getFetchPreference() {
return chain[0].getFetchPreference();
}
@Override
public boolean isAggregation() {
return false;
@@ -74,4 +74,10 @@ public interface ElPropertyDeploy {
* Return true if this is an aggregation property.
*/
boolean isAggregation();
/**
* Return the fetch preference. This can be used to control which ToMany relationship
* is left as a 'join' and which get converted to query join.
*/
int getFetchPreference();
}