【发布时间】:2020-05-20 10:46:13
【问题描述】:
是否可以制定一个像下面这样返回列表1)of max size n的查询方法,
包含 2) createdAfter a specific time (Instant) at DESC order 的 Appliance 对象,
和3) they are of a specific TypeEnum。我已经确定了1st 和2nd 的要求,但是
我还没有找到如何添加max size 和directionrestrictions。
<T extends Appliance> List<T> findAllByTypeAndCreatedAtAfter(ApplianceTypeEnum applianceTypeEnum);
【问题讨论】:
-
谢谢,但不完全是。我还希望能够根据 createdAt 属性定义列表中的方向
标签: java spring mongodb spring-boot java-8