mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1039 Fix for - reset of dirty flag on L2 cached entities after lazy load
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user