📜  条件查询顺序 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:41.102000             🧑  作者: Mango

代码示例1
session=HibernateUtil.getSessionJavaConfigFactory_report().openSession();
CriteriaBuilder builder = session.getCriteriaBuilder();
CriteriaQuery criteriaQuery = builder.createQuery(Object[].class);
List orderList = new ArrayList();
orderList.add(builder.desc(ejeRoot.get("name")));
criteriaQuery.orderBy(orderList);