【发布时间】:2012-12-06 09:59:13
【问题描述】:
这是我的数据库(简化版):
User
@ManyToMany
List<Section> sections;
public static Model.Finder<Long,User> find = new Model.Finder<Long, User>(Long.class, User.class);
Section
Integer year;
@ManyToMany
List<User> users;
public static Model.Finder<Long,Section> find = new Model.Finder<Long, Section>(Long.class, Section.class);
使用 Ebean,我需要列出今年(2012 年)没有与他们相关的任何部分的所有用户(因此,还包括那些根本没有与他们相关的任何部分的用户)。
但我不知道该怎么做。
我试过了:
User.find.where().isNull("sections").findList(); // but it didn't worked
所以我被困在这里。我怎样才能做到这一点?
【问题讨论】:
-
我也有同样的问题,你找到解决办法了吗?
标签: java playframework-2.0 ebean