gpt4 book ai didi

java - 如何按获取列排序?

转载 作者:行者123 更新时间:2023-12-01 09:38:00 25 4
gpt4 key购买 nike

如何按获取列排序?

我的谓词:

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获取列设置选择查询顺序?

最佳答案

解决方案:

Join<Connection, ConnectionResearch> researches = (Join<Connection, ConnectionResearch>) root.fetch(Connection_.researches);
cquery.orderBy(cb.asc(researches.get(ConnectionResearch_.pullForce)));

关于java - 如何按获取列排序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38685933/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com