我写的一个hql语句,查询条件如下所示
where a=?
and ((t.startTime < ? and t.endTime is null)
or (t.startTime < ? and t.endTime >=?)
or (t.endTime between ? and ?))
转换成执行sql却变成了
where a=?
and (t.START_TIME<? and (t.END_TIME is null)
or t.START_TIME<? and t.END_TIME>=?
or t.END_TIME between ? and ?)
求高手解答
...全文
35810打赏收藏
hql 多重括号问题
我写的一个hql语句,查询条件如下所示 where a=? and ((t.startTime < ? and t.endTime is null) or (t.startTime =?) or (t.endTime between ? and ?)) 转换成执行sql却变成了 where a=? and (t.START_TIME<? and (t.END_TIME is null) or t.START_TIME=?