如何解决JPA Spring Boot中预期加入的路径

时间:2018-10-19 08:08:48

标签: java sql hibernate spring-boot jpa

我收到

  

org.hibernate.hql.internal.ast.QuerySyntaxException:预期要加入的路径!

JPA Spring引导错误,请告诉我下面的查询是什么问题

 select q.label, 
 q.id, q.parentId, 
 c.id , c.createdOn,
 c.logAnswerVisualData, 
 c.logAnswerValue, 
 a.label, 
 a.typeId, 
 a.visualTypeId, 
 vt.label, 
(SELECT Count(pq.id) FROM Pinnedquestion pq WHERE 
pq.questionId = q.id  AND pq.userId =:userId), 
(SELECT Count(fq.id) FROM Favoritequestion fq WHERE 
fq.questionId = q.id  AND fq.userId =:userId), 
at.label FROM Question q JOIN Conversation c ON q.id = 
c.questionId JOIN Answer a ON  a.id = q.answerId JOIN AnswerType at ON  
at.id = a.typeId LEFT JOIN VisualizationType vt ON vt.id = a.visualTypeId 
WHERE  c.userId =:userId AND c.id=:convId ORDER BY c.serverTimestamp desc

0 个答案:

没有答案