【发布时间】:2018-02-07 09:28:17
【问题描述】:
我写了一个查询,但是这个查询返回了这个错误。你知道吗?我猜我得到这个错误是因为括号
@Query("select u from Context u where u.user.id <> :userId and u.publicWatch = 1 and u.isDeleted = 0 and (u.contextType.id IN :contextTypeId or u.status IN :status)")
Page<Context> findFilteredContexts(@Param("userId") Long userId,@Param("contextTypeId") List<Long> contextTypeId,@Param("status") List<String> status, Pageable pageable);
错误:
引起:java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException:意外的 AST 节点: {vector} [select count(u) from com.huawei.ti.ei.web.domain.Context u where u.user.id :userId and u.publicWatch = 1 and u.isDeleted = 0 and (u.contextType.id IN (:contextTypeId_0_) 或 u.status IN :status_0_, :status_1_)]
【问题讨论】:
标签: hibernate