trival update to EntityFieldValue.java in case the entityAlias is empty
-----------------------------------------------------------------------
Key: OFBIZ-4331
URL: https://issues.apache.org/jira/browse/OFBIZ-4331
Project: OFBiz
Issue Type: Bug
Components: framework
Affects Versions: SVN trunk
Reporter: Leon
Priority: Trivial
Fix For: SVN trunk
Attachments: EntityFieldValue.patch
Sometimes, there's only one member entity in a view. In such case, you can omit
the "entity-alias" in entity condition setting. In this situation, the
entityAlias is not "null" but an emtpty string.
===================================================================
--- framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java
(revision 1513)
+++ framework/entity/src/org/ofbiz/entity/condition/EntityFieldValue.java
(working copy)
@@ -124,7 +124,7 @@
@Override
public ModelField getModelField(ModelEntity modelEntity) {
if (this.modelViewEntity != null) {
- if (this.entityAlias != null) {
+ if (UtilValidate.isNotEmpty(this.entityAlias)) {
ModelEntity memberModelEntity =
modelViewEntity.getMemberModelEntity(entityAlias);
return getField(memberModelEntity, fieldName);
} else {
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira