1
:私は「QueryDSL:見つけ、CLOSE期待 '(' 次QueryDSLコードでそう間違って何
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: expecting CLOSE, found '(' near line 1, column 41 [select date(chat.datePosted), count(date(chat.datePosted))
from com.test.model.Chat chat
where chat.datePosted >= ?1 and chat.datePosted < ?2
group by date(chat.datePosted)]
:?私はこのような例外を取得
query.from(chat).where(
chat.datePosted.goe(startDate.atStartOfDay()).
and(chat.datePosted.lt(endDate.plusDays(1).atStartOfDay()))).
groupBy(date(chat.datePosted)).
list(date(chat.datePosted), date(chat.datePosted).count());
Springブート1.3.6とQueryDSL 3.7.4(JPA by Hibernate)を使用しています。
[この質問](http://stackoverflow.com/questions/18984611/querydsl-jpa-dayofyear-dayofmonth-translation-to-hibernate)に関連しているようですが、私は休止状態でこのような単純なクエリを解析することはできません。 –
問題はendDate.plusDays(1).atStartOfDay()にあるようです - まずその値を計算してから値を渡してみてください。 –
DATEは有効なJPQL関数ではありません。どんなJPQLリファレンスもこれを伝えるでしょう –