我正在尝试处理查询列表的结果,但是当我尝试运行以下代码时:
SimpleExpression<?>[] selectClause = buildSelectClause();
PathBuilder<?>[] fromClause = buildFromClause();
Predicate[] whereClause = buildWhereClause();
Session session = HibernateUtil.currentSession();
HibernateQuery query = new HibernateQuery(session);
List<Tuple> result = query.from( fromClause )
.where( whereClause )
.list( new QTuple(selectClause) );
我收到此错误:
Exception in thread "main" java.lang.NoSuchMethodError:
com.mysema.query.jpa.hibernate.HibernateQuery.from([Lcom/mysema/query/types
/EntityPath;)Lcom/mysema/query/jpa/JPQLQueryBase;
这对我来说毫无意义,我正在使用querydsl-jpa.3.2.4。有谁知道发生了什么?