mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1181 - ENH: Add @FetchPreference support - Secondary query generation is based on order of fetch statements
This commit is contained in:
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();
|
||||
}
|
||||
Reference in new issue
Block a user