如何通过获取列来订购?

时间:2016-07-31 16:10:13

标签: java hibernate jpa specifications

如何通过获取列进行排序?

我的谓词:

CriteriaQuery<Connection> cquery = (CriteriaQuery<Connection>) query;
Fetch<Connection, ConnectionResearch> researches = root.fetch(Connection_.researches, JoinType.INNER);
cquery.orderBy(cb.asc( /* researches.get(ConnectionResearch_.pullforce) */ ));

如何通过ConnectionResearch.pullforce获取列来设置选择查询顺序?

1 个答案:

答案 0 :(得分:1)

解决方案:

MyWebPage