我有一个疑问:
Date dDateFrom;
...
String sql = "select a from tblA where timestamp > ?";
ps = this.connection.prepareStatement(sql);
ps.setTimestamp(1, java.sql.Timestamp(dDateFrom.getTime()));
IntelliJ IDE 警告错误:无法解析查询参数,我相信这是因为“时间戳”列(我知道这是一个坏名字,但它是十年前定义的,我无法更改它)。
无论如何我可以忽略这个错误吗?
Navigate over the part of the code where the error is highlighted, hit ALT+ENTER and select Inspection 'Unresolved queries and query parameter' options -> Edit inspection profile settings. This will open settings dialog where you can uncheck this inspection so that future "errors" of this kind will be ignored.
您也可以直接从“设置”中更改它。只需搜索未解决的查询.
顺便说一句:此检查显示为 JPA 检查,但显然它也适用于普通 JDBC。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)