You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2014/11/07 19:54:34 UTC
[jira] [Closed] (METAMODEL-91) isNotNull () is actually isNull()
and isNull() isn't work in UpdateCallback of JdbcDataContext
[ https://issues.apache.org/jira/browse/METAMODEL-91?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kasper Sørensen closed METAMODEL-91.
------------------------------------
Resolution: Duplicate
Thank you for reporting the issue. It is actually a duplicate of METAMODEL-85, so I'll close this one and I have also raised the priority of the other issue.
> isNotNull () is actually isNull() and isNull() isn't work in UpdateCallback of JdbcDataContext
> ----------------------------------------------------------------------------------------------
>
> Key: METAMODEL-91
> URL: https://issues.apache.org/jira/browse/METAMODEL-91
> Project: Metamodel
> Issue Type: Bug
> Affects Versions: 4.1.0-incubating, 4.2.0-incubating
> Environment: jdk6 on windows7
> Reporter: xgl1991714
>
> here is my code of java:
> {quote}
> Class.forName({color:blue}"com.mysql.jdbc.Driver"{color});
> Connection conn = DriverManager.getConnection({color:blue}"jdbc:mysql://localhost:3306/mydb?user=root&password=xxxxxx"{color});
> UpdateableDataContext dataContext=DataContextFactory.createJdbcDataContext(conn);
> dataContext.executeUpdate({color:#7F0055}*new*{color} UpdateScript() {
> {color:#7F0055}*public void*{color} run(UpdateCallback callback) {
> {color:green}//do something{color}
> }
> });
> {quote}
> when I run:
> {quote}
> callback.deleteFrom({color:blue}"dept"{color}).where({color:blue}"dname"{color}).*{color:red}isNull(){color}*.execute();
> {quote}
> the table remains the same
> when I run:
> {quote}
> callback.deleteFrom({color:blue}"dept"{color}).where({color:blue}"dname"{color}).*{color:red}isNotNull(){color}*.execute();
> {quote}
> I found “dname” field is not null records still exist,but other records have been deleted.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)