0
我有2个实体Question
和Answer
之间的many2one关系与Answer' and no one2many defined in
Question`中定义的many2one。休眠到很多反向查询
如何在冬眠时查询没有任何答案的问题,而无需在Question
实体中添加one2many关系?
类似:
select distinct q from Question q
left join Answer a on a.question_id=q.id
where a.id is null
谢谢,这很好。我不知道如何编写hql,所以我通过这种方式为像我这样的人编写了半SQL,他们通常不会读取描述并跳到代码:P – alizelzele