考虑以下:
@Entity
public class Book
{
private List<String> authors;
@ElementCollection
public List<String> getAuthors() {
return authors;
}
public void setAuthors(List<String> authors) {
this.authors = authors;
}
}
如何输入一个 JPA2 CriteriaQuery 表达式,比如说,它可以让我找到所有超过 2 个作者的书籍?