【发布时间】:2021-03-12 05:32:15
【问题描述】:
假设我有
@Entity()
class Order {
int id;
final item = ToOne<Item>();
final customer = ToOne<Customer>();
}
@Entity()
class Item {
int id;
int price;
@Backlink()
final orders = ToMany<Order>();
}
如何根据商品价格查询过滤订单。我知道我可以查询商品并获取反向链接订单,但是否有可能反过来呢?例如:
final orders = store.box<Order>().query(Order_.item.price < 100).build().
docs 表示即使跨关系过滤数据,但我找不到方法。
【问题讨论】: