#1039 Fix for - reset of dirty flag on L2 cached entities after lazy load

This commit is contained in:
rob bygrave
2017-06-23 23:20:17 +12:00
parent f1f2a416d3
commit 4b2481d3ea
2 changed files with 13 additions and 0 deletions
@@ -135,6 +135,10 @@ class SqlTreeNodeBean implements SqlTreeNode {
pathMap = createPathMap(prefix, desc);
}
protected boolean isRoot() {
return false;
}
@Override
public ScalarType<?> getSingleAttributeScalarType() {
if (properties == null || properties.length == 0) {
@@ -316,6 +320,10 @@ class SqlTreeNodeBean implements SqlTreeNode {
aChildren.load(ctx, localBean, contextBean);
}
if (queryMode.equals(Mode.LAZYLOAD_MANY) && isRoot()) {
return contextBean;
}
if (!lazyLoadMany && localBean != null) {
ctx.setCurrentPrefix(prefix, pathMap);
if (readId && !temporalVersions) {