关于ejbql的问题?请大虾指教。

03-01-21 genggjh

我有一个ejbql语句:
select object(yfbzb) from YFBZB yfbzb where (yfbzb.yFBZMXB.yFBZSJLBB.bdzt = '20-03:1') OR (yfbzb.yFBZMXB.yFBZSJLBB is EMPTY)
执行它系统报错:java.sql.SQLException: ORA-00904: 无效列名
但是如果我将where后的条件分开来写:
select object(yfbzb) from YFBZB yfbzb where (yfbzb.yFBZMXB.yFBZSJLBB.bdzt = '20-03:1')
或者写成:
select object(yfbzb) from YFBZB yfbzb where (yfbzb.yFBZMXB.yFBZSJLBB is EMPTY)
却又不报错,我很是困惑,请大虾指教。
(顺便说一句,我写成:select object(yfbzb) from YFBZB yfbzb where (yfbzb.yFBZMXB.yFBZSJLBB.bdzt = '20-03:1') OR (yfbzb.yFBZMXB.yFBZSJLBB is not EMPTY) 它也不会报错???)