[
https://issues.apache.org/jira/browse/OPENJPA-3050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136949#comment-18136949
]
ASF subversion and git services commented on OPENJPA-3050:
----------------------------------------------------------
Commit 10bc16d73879a9ac003fb6e3d890c9132d46a7a7 in openjpa's branch
refs/heads/master from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=10bc16d73 ]
[OPENJPA-3050] Return null for arithmetic with a null operand evaluated in
memory (#257)
> 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
> Priority: Major
>
> 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)