2010-05-20 37 views
2

我有以下HQL查询:问题上HQL查询

from Admin a where a.genericTable is null or (a.genericTable.allowInsertion = true or a.genericTable.allowInsertion is null) 

的问题是,该结果集,这还不包括由在过滤器上的所有条目:a.genericTable is null

有谁知道这是为什么?

谢谢!

+0

你有,你认为应该返回一些示例行? – 2010-05-20 16:13:06

回答

1

尝试左连接:

from Admin as a left join a.genericTable as g 
where (g is null or (g.allowInsertion = true or g.allowInsertion is null))