【发布时间】:2014-08-08 09:37:54
【问题描述】:
我遇到了这个休眠异常:
org.hibernate.QueryException: , expected in SELECT [select tc.id as
id, tc.terminalServerPort.id as terminalServerPortId,
tc.terminalServerPort.terminalServer.name as terminalServerName,
tc.terminalServerPort.terminalServer.ipConfig.ipAddress as
terminalServerIpAddress, tc.terminalServerPort.portNumber as
terminalServerPort from
com.windriver.dsm.labmanagement.data.TargetConsole tc where
tc.target.id = :targetId order by id asc]
有什么想法吗? 谢谢!
【问题讨论】:
-
你能不能给我们看看hql-查询?
-
什么意思?这是 HQL 查询。
-
你的java源代码中的查询?!
-
@Jens 表示您在源代码中编写的查询。这是 Hibernate 生成的查询。
-
...不,不是,这是 Hibernate 不喜欢的 HQL,它将是代码中的查询:/ 但我同意,最好在上下文中查看它代码而不是日志中。我看不出上面贴的有什么问题。