Richard Zowalla created OPENJPA-3050:
----------------------------------------

             Summary: In-memory arithmetic treats NULL as 0
                 Key: OPENJPA-3050
                 URL: https://issues.apache.org/jira/browse/OPENJPA-3050
             Project: OpenJPA
          Issue Type: Bug
            Reporter: Richard Zowalla


When a query is evaluated in memory (for example over a candidate collection), 
arithmetic with a NULL operand returns a number instead of NULL. {{Filters.op}} 
treats null as 0, so {{-n.intB}} or {{0 - n.intB}} with {{intB = null}} gives 0 
in memory, while the database returns NULL. The same applies to {{+}}, {{*}} 
and {{/}}, and to the in-memory bulk update path in {{JDBCStoreQuery}}, which 
also calls {{Filters.op}}.

Found while working on OPENJPA-3044.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to