3
我有一个Device
类和Event
类像这样把条件对列表场在给定的Date from
和Date to
之间。还有听起来很简单,但我有点不能让我想用Ebean
什么,这是我怎么想应该工作,但我得到的设备不正确,使用Ebean和播放框架
Model.Finder<Long, Device> find = new Model.Finder<>(Long.class, Device.class);
Page<Device> devicePage = find.where()
.or(
Expr.lt("events.end", from),
Expr.gt("events.start", to)
)
.orderBy("id asc")
.findPagingList(10)
.setFetchAhead(false)
.getPage(0);
很好,这不幸的是不能正常工作 – behzad