mku*_*uff 2 java hibernate hql
我的实体定义如下:
public class Entity implements Serializeable {
@ManyToMany(mappedBy="entities")
private List<OtherEntity> otherEntities;
}
Run Code Online (Sandbox Code Playgroud)
如何在HQL中选择具有多个OtherEntity的所有实体?
我认为这应该有效.这将生成带有子查询的SQL - 不获取它并在内存中过滤它.
from Entity e where e.otherEntities.size > 1
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2297 次 |
最近记录: |