0
請隨時運行我的應用程序,我得到這個錯誤....任何幫助請。HQL查詢不同記錄
java.lang.IllegalArgumentException: node to traverse cannot be null!
org.hibernate.hql.internal.ast.util.NodeTraverser.traverseDepthFirst(NodeTraverser.java:63)
org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:272)
org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180)
org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:119)
org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:214)
org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:192)
org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1537)
org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:285)
sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
這是我在我的倉庫類
@Query("distinct v from voucher v where v.voucherType.typeID = :typeID ")
public List<Voucher> findDistinctByVoucherType(@Param("typeID") Long voucherTypeId);
刪除v –