【发布时间】:2016-01-18 08:13:26
【问题描述】:
我在Question 和Answer 两个实体之间有many2one 关系,其中many2one 定义在Answer' and no one2many defined inQuestion` 中。
如果不在Question实体中添加one2many关系,我如何通过休眠查询没有任何答案的问题?
类似:
select distinct q from Question q
left join Answer a on a.question_id=q.id
where a.id is null
【问题讨论】:
标签: hibernate hql hibernate-onetomany