diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java index 9abade5428..e310eb7e89 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java @@ -157,13 +157,9 @@ public abstract class AbstractEntityConditionCache extends AbstractCache> convert(boolean isPK, String targetEntityName, GenericEntity entity) { + protected List> convert(String targetEntityName, GenericEntity entity) { if (isNull(entity)) return null; - if (isPK) { - return entity.getModelEntity().convertToViewValues(targetEntityName, entity); - } else { - return entity.getModelEntity().convertToViewValues(targetEntityName, entity); - } + return entity.getModelEntity().convertToViewValues(targetEntityName, entity); } public void storeHook(boolean isPK, GenericEntity oldEntity, GenericEntity newEntity) { @@ -177,7 +173,7 @@ public abstract class AbstractEntityConditionCache extends AbstractCache it = model.getViewConvertorsIterator(); while (it.hasNext()) { String targetEntityName = it.next(); - storeHook(targetEntityName, isPK, convert(isPK, targetEntityName, oldEntity), convert(false, targetEntityName, newEntity)); + storeHook(targetEntityName, isPK, convert(targetEntityName, oldEntity), convert(targetEntityName, newEntity)); } }