[jira] [Updated] (OFBIZ-4331) trival update to EntityFieldValue.java in case the entityAlias is empty

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4331) trival update to EntityFieldValue.java in case the entityAlias is empty

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sharan Foga updated OFBIZ-4331:
-------------------------------
    Sprint: Bug Crush Event - 21/2/2015

> 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: Trunk
>            Reporter: Leon
>            Assignee: Adam Heath
>            Priority: Trivial
>         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 was sent by Atlassian JIRA
(v6.3.4#6332)