如何在休眠条件中的 LEFT_JOIN 中提供 OR 子句。
Criteria mainCrit=hibernateSession.createCriteria("Main.class");
Criteria aPropertyCrit=mainCrit.createCrieria("child",CriteriaSpecification.LEFT_JOIN);
它生成sql为
select this_.Id,this_childId....
from main as this_
left join child as child1_ on child1_ .id=this_.childId
where.....
我需要将sql生成为
select this_.Id,this_childId....
from main as this_
left join child as child1_ on child1_.id=this_.childId or child_.ParentId=this_.childId
where.....
如何在上述条件中的 LEFT_JOIN 中提供 OR 子句。