我试图在spring/hibernate代码中运行命名查询,但它在命名查询中返回错误。查询是
select count(*) from
(select distinct td.ticketId,td.taskName as names
from TaskWorklog td
where td.taskName LIKE CONCAT ('%' , ^SubTask, '%')
and (td.taskName not in (
select td.taskName from TaskWorklog td
where td.taskName LIKE CONCAT ('%' , ^SubTask, '%') and td.operationType in (3,5,6,9,11,13,15,17,24)))) as twd1 where twd1.ticketId=etm.ticketId
group by twd1.ticketId) as open_subtask
你能告诉我另一个选择还是同样的错误吗,因为我不知道错误是什么。
原因:
org.hibernate.hibernate异常:命名查询中的错误:位于org.hibernate.internal.sessionfactoryimpl.(sessionfactoryimpl)的fetchpendingformyactiondetails。java:532)在org.hibernate.cfg.configuration.buildsessionfactory(配置。java:1797)在org.hibernate.cfg.configuration.buildsessionfactory(配置。java:1868)在org.springframework.orm.hibernate4.localsessionfactorybuilder.buildsessionfactory(localsessionfactorybuilder)。java:343)
暂无答案!
目前还没有任何答案,快来回答吧!