0
我在我的Spring Web模型 - 视图 - 控制器(MVC)框架中有这个类。 Spring Web模型 - 视图 - 控制器(MVC)框架的版本是3.2.8。Hibernate HQL意外令牌与喜欢
,我必须在1个DAO
final StringBuilder queryString = new StringBuilder(" select app from Application app where upper (ticket_id) like :searchString and upper (id) like :searchString ");
queryString.append("where app.status != " + Status.READY.ordinal());
queryString.append(" order by app.submissionTime desc ");
try {
final Query query = getEntityManager().createQuery(queryString.toString());
searchString = searchString.replace("!", "!!")
.replace("%", "!%")
.replace("_", "!_")
.replace("[", "![")
.trim()
.toUpperCase();
query.setParameter ("searchString", searchString);
return query.getResultList();
这种方法,但我对运行时此错误:
org. where near line 1, column 144 [ select app from com.tdk.devices.domain.Application app where upper (ticket_id) like :searchString and upper (id) like :searchString where app.status != 0 order by app.submissionTime desc ]
第144列是app.status的开始 - 与喜欢无关 – DaveRlz