Hi,
I have 3 classes A,B,C and B,C having properties b1 and c1 respectively
I want to create an Equivalent of the following HQL in Criteria API.
from A where B.B1=212 or C.C1=12 : Query1
Is the above code equivalent to
Code:
Criteria c=session.createCriteria(B.class);
Criteria c1=c.createCriteria("b");
Criteria c2=c.createCriteria("c");
c1.add(Expression.eq("b1",212);
c2.add(Expression.eq("c1",12);
I don't really know but i think the above Criteria is equivalent to
from A where B.B1=212 and C.C1=12 : Query2
if its so then what will will equivalent code for Query1,
Thanks in adv