You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "xgl1991714 (JIRA)" <ji...@apache.org> on 2014/11/07 07:14:33 UTC

[jira] [Updated] (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 ]

xgl1991714 updated METAMODEL-91:
--------------------------------
    Labels:   (was: JDK)

> 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() {
> &nbsp;&nbsp;&nbsp;&nbsp;{color:#7F0055}*public void*{color} run(UpdateCallback callback) { 
>             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {color:green}//do something{color}
>  &nbsp;&nbsp;&nbsp;&nbsp;}
> 		});
> {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)