#2163 - Fix OrmQueryProperties when FetchConfig null

This commit is contained in:
rob bygrave committed 2021-02-14 11:30:24 +13:00
1 parent a6fdc42934
commit ab87174e5b
1 file changed
+8 -4
@@ -84,18 +84,22 @@ public class OrmQueryProperties implements Serializable {
} }
public OrmQueryProperties(String path, String rawProperties) { public OrmQueryProperties(String path, String rawProperties) {
this(path, rawProperties, null); this(path, rawProperties, DEFAULT_FETCH);
} }
public OrmQueryProperties(String path, String rawProperties, FetchConfig fetchConfig) { public OrmQueryProperties(String path, String rawProperties, FetchConfig fetchConfig) {
this.path = path; this.path = path;
this.parentPath = SplitName.parent(path); this.parentPath = SplitName.parent(path);
OrmQueryPropertiesParser.Response response = OrmQueryPropertiesParser.parse(rawProperties); OrmQueryPropertiesParser.Response response = OrmQueryPropertiesParser.parse(rawProperties);
this.properties = response.properties; this.properties = response.properties;
this.included = response.included; this.included = response.included;
this.fetchConfig = fetchConfig != null ? fetchConfig : DEFAULT_FETCH; if (fetchConfig != null) {
this.cache = fetchConfig.isCache(); this.fetchConfig = fetchConfig;
this.cache = fetchConfig.isCache();
} else {
this.cache = false;
this.fetchConfig = DEFAULT_FETCH;
}
} }
public OrmQueryProperties(String path, Set<String> included) { public OrmQueryProperties(String path, Set<String> included) {