diff --git a/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java b/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java index 8ab2dd5f9f..f4bf832e52 100644 --- a/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java +++ b/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java @@ -75,7 +75,7 @@ public class ModelViewEntity extends ModelEntity { protected List allModelMemberEntities = FastList.newInstance(); /** Contains member-entity ModelEntities: key is alias, value is ModelEntity; populated with fields */ - protected Map memberModelEntities = null; + protected Map memberModelEntities = FastMap.newInstance(); /** List of alias-alls which act as a shortcut for easily pulling over member entity fields */ protected List aliasAlls = FastList.newInstance(); @@ -190,10 +190,6 @@ public class ModelViewEntity extends ModelEntity { } public ModelEntity getMemberModelEntity(String alias) { - if (this.memberModelEntities == null) { - this.memberModelEntities = FastMap.newInstance(); - populateFields(this.getModelReader()); - } String entityName = this.memberModelEntities.get(alias); return entityName != null ? this.getModelReader().getModelEntityNoCheck(entityName) : null; } @@ -397,10 +393,6 @@ public class ModelViewEntity extends ModelEntity { } public void populateFieldsBasic(ModelReader modelReader) { - if (this.memberModelEntities == null) { - this.memberModelEntities = FastMap.newInstance(); - } - for (Map.Entry entry: memberModelMemberEntities.entrySet()) { ModelMemberEntity modelMemberEntity = entry.getValue();