xgl1991714 created METAMODEL-91:
-----------------------------------
Summary: 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
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)