[
https://issues.apache.org/jira/browse/METAMODEL-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14202082#comment-14202082
]
Dennis Du Krøger commented on METAMODEL-85:
-------------------------------------------
That is just my example being badly recreated. The statement was certainly run,
as we saw the generated SQL do the "WHERE x = NULL".
We talked about it at the time, and I think we reached the conclusion that it
works as it should for SELECT statements, but not for UPDATE statements. The
fix you remember may have been for SELECT?
> isNull() uses = instead of IS NULL in SQL update query
> -------------------------------------------------------
>
> Key: METAMODEL-85
> URL: https://issues.apache.org/jira/browse/METAMODEL-85
> Project: Metamodel
> Issue Type: Bug
> Affects Versions: 4.2.0-incubating
> Environment: JDK 8 on Windows 7
> Reporter: Dennis Du Krøger
>
> An update statement with a isNull() should with a JdbcDataContext translate
> to WHERE hello IS NULL, but instead translates to "WHERE hello = NULL", which
> does not work as intended, since NULL in SQL is never equal to anything, even
> other NULLs.
> {code}
> private void testCode(){
> _dataContext.executeUpdate(new UpdateScript() {
> @Override
> public void run(UpdateCallback callback) {
> callback.update("foo").value("bar",
> 1).where("baz").eq(2).where("hello").isNull();
> }
> });
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)