mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#566 - Refactor internals - OrmQueryDetail, skip fetch path sort when empty
This commit is contained in:
@@ -298,15 +298,18 @@ public class OrmQueryDetail implements Serializable {
|
||||
fetch(new OrmQueryProperties(path, properties));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the fetch paths into depth order adding any missing parent paths if necessary.
|
||||
*/
|
||||
public void sortFetchPaths(BeanDescriptor<?> d) {
|
||||
|
||||
LinkedHashMap<String, OrmQueryProperties> sorted = new LinkedHashMap<String, OrmQueryProperties>();
|
||||
|
||||
for (OrmQueryProperties p : fetchPaths.values()) {
|
||||
sortFetchPaths(d, p, sorted);
|
||||
if (!fetchPaths.isEmpty()) {
|
||||
LinkedHashMap<String, OrmQueryProperties> sorted = new LinkedHashMap<String, OrmQueryProperties>();
|
||||
for (OrmQueryProperties p : fetchPaths.values()) {
|
||||
sortFetchPaths(d, p, sorted);
|
||||
}
|
||||
fetchPaths = sorted;
|
||||
}
|
||||
|
||||
fetchPaths = sorted;
|
||||
}
|
||||
|
||||
private void sortFetchPaths(BeanDescriptor<?> d, OrmQueryProperties p, LinkedHashMap<String, OrmQueryProperties> sorted) {
|
||||
|
||||
Reference in New Issue
Block a user