#1816 Fix for OneToMany relation to non-cached target bean.

This commit is contained in:
rob bygrave
2019-09-12 14:55:37 +12:00
parent 3495d03706
commit d2ece76ca8
5 changed files with 13 additions and 5 deletions
@@ -209,7 +209,7 @@ class DLoadManyContext extends DLoadBaseContext implements LoadManyContext {
public void loadMany(BeanCollection<?> bc, boolean onlyIds) {
synchronized (this) {
boolean useCache = context.hitCache && !onlyIds;
boolean useCache = !onlyIds && context.hitCache && context.property.isUseCache();
if (useCache) {
EntityBean ownerBean = bc.getOwnerBean();
BeanDescriptor<?> parentDesc = context.desc.getBeanDescriptor(ownerBean.getClass());