开发者

Problem on Hql query

I have the following hql query:

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

The problem is that the result set is e开发者_如何学JAVAxcluding all entries that are comprised on filter: a.genericTable is null

Does anyone knows why?

Thanks!


Try a left join:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜