[ 
https://issues.apache.org/jira/browse/OFBIZ-4393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13148107#comment-13148107
 ] 

Anne Jessel commented on OFBIZ-4393:
------------------------------------

I've tested a combination of Adrian's approach and Leon's comments regarding 
relFieldName, and uploaded a new patch. I can confirm it works for my use case. 
A condition-expr in a view-entity that has no value or rel-field-name will now 
correctly compare with null.

In reviewing the relevant code, I did notice a potential change in behaviour 
with this approach. Because an absent value and value="" are treated the same 
way, a NOT_EQUAL comparison with the empty string will be treated as a 
NOT_EQUAL test with null instead.
                
> View entity condition-expr doesn't handle null
> ----------------------------------------------
>
>                 Key: OFBIZ-4393
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4393
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>         Environment: Rev 1165137
>            Reporter: Anne Jessel
>            Assignee: Adrian Crum
>         Attachments: OFBIZ-4393-view-entity_condition-expr_null.patch, 
> OFBIZ-4393-view-entity_condition-expr_null.patch, 
> OFBIZ-4393-view-entity_condition-expr_null.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> condition-expr tag in view-entity can't be used to compare a field with null. 
> An absent value attribute is read as an empty string, and the code currently 
> checks for value being null to know when to compare against null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to