我已经用一些订单创建了Criteria:
Criteria criteria = session.createCriteria(MyEntity.class);
criteria.addOrder(Order.asc(MyEntity.SOME_PROPERTY));
ScrollableResults scrollableResults = criteria.scroll(ScrollMode.FORWARD_ONLY);
List<MyEntity> list = new ArrayList<>();
while(scrollableResults.next()) {
list.add(scrollableResults.get(0));
}
来自list
的MyEntities会按SOME_PROPERTY
排序吗?